自己的做的简单留言板,修改资料出问题了!
最近新学了PHP,自己动手做了一个简单的留言,在修改资料的时候,出现了一个问题
修改页面如下:
<?php
include("conn.php");
include("head.php");
if($_POST[hide])
{
$eid=$_POST[hide];
echo $eid; ////////////////这个地方接受不到ID的值,总是显示为1
}
$lid=$_GET[id];
$sql="select * from lyb where id=".$lid."";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
?>
<br>
<form action="" method="post" name="frm" id="frm">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="91" height="30" align="right">留言标题:</td>
<td width="509"><label>
<input name="title" type="text" id="title" value="<? echo $row[title]?>" />
<input name="hide" type="text" id="hide" value="<? echo $row[id]?>" />
</label></td>
</tr>
<tr>
<td height="30" align="right">留言内容:</td>
<td><label>
<textarea name="content" id="content" cols="45" rows="5"><? echo $row[content]?>
</textarea>
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="button" id="button" value="修改" />
<input name="hide" type="hidden" id="hide" value="1" />
</label></td>
</tr>
</table>
</form>