<?php
include("../conn.php"); if ($_GET[post])
{ $sql = "SELECT * FROM message WHERE id = $_GET[post]"; $query = mysql_query($sql); $row = mysql_fetch_array($query);
} if($_POST['submit'])
{ $sql = "insert into reply (id,id_p,time,content) values('','$_GET[post]',now(),'$_POST[content]')"; mysql_query($sql); echo "<meta http-equiv=refresh content=0";
}?>在
$sql = "insert into reply (id,id_p,time,content) values('','$_GET[post]',now(),'$_POST[content]')";中,id_p的值一直是0,其余的取值都正常,不知道为什么
.$_GET[post]是有值的,在这段代码上方和下方都能用,但是就在这个SQL语句当中不能用...
想了很多办法,比如在代码前面加上$a = $_GET[post],用$row[id](message表中的id其实就是$_GET[post]的值),都不读不到取值;
难道是
echo "<meta http-equiv=refresh content=0";
的问题?

慕丝7291255
幕布斯7119047
慕盖茨4494581
随时随地看视频慕课网APP