<center>
<?php
if(isset($_POST['submit']))
{
$title = $_POST['title'];
$content = $_POST['content'];
$id= $_POST['id'];
mysql_query("UPDATE post SET title='$title',content='$content' WHERE p_id='$id'");
echo 'success';
}else{
?>
<form action='update.php' method='post'>
<span style="font-size:26px;"><strong><span style="font-family: verdana, geneva, sans-serif; ">Title: </span></strong></span>
<input type='text' name='title' /><br />
<input type="hidden" value="<?php echo $_REQUEST['id']?>" name="id">
<span style="font-size:26px;"><strong><span style="font-family: verdana, geneva, sans-serif; ">Content: </span></strong></span>
<textarea name='content' ></textarea><br />
<input type='submit' name='submit' value='EDIT'/>
</form>
<?php
}
?>
</center>
这个查询有什么问题?$_REQUEST['id'] 来自我的 php 的另一页,它来自带有值的超链接。顺便说一下,我是 php 的初学者。