duanheye7423 2014-10-16 19:38
浏览 16
已采纳

我有这个错误:解析错误:语法错误,意外'如果'(T_IF)[关闭]

I have a problem, Do not understand why I get that error, I'm riding the page on my local server, when I try to access the file I get this error, but if you run it with me snippet shows how on this page.

<html>
    <head>
        <title>Ingresa Un Nuevo Articulo</title>
    </head> 

<body>
<form method="post" action="insert_post.php" enctype="multipart/form-data">

    <table width="600" align="center" border="10">

        <tr>

            <td align="center" bgcolor="yellow" colspan="6"><h1>Ingresa Un Nuevo Articulo Aqui</h1></td>

        </tr>

        <tr>

            <td align="right">Titulo Del Articulo</td>
            <td><input type="text" name="title" size="30"></td>

        </tr>

        <tr>

            <td align="right">Autor Del articulo</td>
            <td><input type="text" name="author" size="30"></td>

        </tr>

        <tr>

            <td align="right">Keywords Del articulo</td>
            <td><input type="text" name="keywords" size="30"></td>

        </tr>

        <tr>

            <td align="right">Imagen Del articulo</td>
            <td><input type="file" name="image"></td>

        </tr>

        <tr>

            <td align="right">Contenido Del Articulo</td>
            <td><textarea name="content" cols="30" rows="15"></textarea></td>

        </tr>

        <tr>


            <td align="center" colspan="6"><input type="submit" name="submit" value="Enviar Noticia"></td>

        </tr>

    </table>
</form>
</body>
</html>

<?php
include("includes/connect.php")

if(isset($_POST['submit'])){

    echo $_post_title = $_POST['title'];
    echo $_post_date = date('d-m-y');
    echo $_post_author = $_POST['author'];
    echo $_post_keywords = $_POST['keywords'];
    echo $_post_content = $_POST['content'];
    echo $_post_image = $_POST['image']['name'];





}
  • 写回答

2条回答 默认 最新

  • doze79040 2014-10-16 19:43
    关注

    Seems like you forgot a ;

    <?php
    include("includes/connect.php");
    
    if(isset($_POST['submit'])){
        echo $_post_title = $_POST['title'];
        echo $_post_date = date('d-m-y');
        echo $_post_author = $_POST['author'];
        echo $_post_keywords = $_POST['keywords'];
        echo $_post_content = $_POST['content'];
        echo $_post_image = $_POST['image']['name'];
    }
    ?>
    

    That should do the trick

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测