评论未显示php

时间:2017-01-06 21:09:53

标签: php mysql

我有一个将数据发送到我的数据库的表单,并且使用此表单我可以在我的帖子下面发表评论,但问题是:当我去一个帖子评论它时,我(先)插入一个评论和插入评论后,我可以看到其他评论,我不知道问题出在哪里

表单php

<system.webServer>
    <rewrite>
        <rules>
            <rule name="Redirect to https" stopProcessing="true">
                <match url=".*" />
                <conditions>
                    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    <!-- avoid redirection for the following paths -->
                    <add input="{PATH_INFO}" pattern="^/service1/" ignoreCase="true" negate="true" />
                    <add input="{PATH_INFO}" pattern="^/service2/" ignoreCase="true" negate="true" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>

评论功能php

<?php 

    echo "<form class='form-horizontal well' method='POST' action='".setComments($conn)."'>
    <input type='hidden' name='id' value='".$row['id']."'>
    <input type='hidden' name='date' value='".date('Y-m-d H:i:s')."'>
    <div class='form-group'>
    <label for='message' class='col-lg-2 control-label'>Comment:</label>
    <div class='col-lg-10'>
    <textarea name='message' placeholder='Write your comment...' class='form-control' rows='4'></textarea>
    </div></div><br>
    <div class='form-group'>
    <div class='col-lg-10 col-lg-offset-2'>
    <button name='commentSubmit' type='submit' class='btn btn-primary'>Comment</button>
    </div>
    </div>
    </form>";

    getComments($conn);

?>

0 个答案:

没有答案