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 爬取1-112页所有帖子的标题但是12页后要登录后才能 我使用selenium模拟登录 账号密码输入后 会报错 不知道怎么弄了
  • ¥30 关于用python写支付宝扫码付异步通知收不到的问题
  • ¥50 vue组件中无法正确接收并处理axios请求
  • ¥15 隐藏系统界面pdf的打印、下载按钮
  • ¥15 MATLAB联合adams仿真卡死如何解决(代码模型无问题)
  • ¥15 基于pso参数优化的LightGBM分类模型
  • ¥15 安装Paddleocr时报错无法解决
  • ¥15 python中transformers可以正常下载,但是没有办法使用pipeline
  • ¥50 分布式追踪trace异常问题
  • ¥15 人在外地出差,速帮一点点