问个问题啊
这个修改 我能看懂 可是具体修改 那个 就只能 在修改的 页面里面 换ID值么?where id=4 或者 where id=10 这多麻烦啊....
这个修改 我能看懂 可是具体修改 那个 就只能 在修改的 页面里面 换ID值么?where id=4 或者 where id=10 这多麻烦啊....
2015-12-11
<?php
require_once("../config.php");
require_once("../connect.php");
$sql="select * from 文章 where id=8";
$query=mysql_query($sql);
//assoc是关联数组 比如字段叫name 就可以用echo $date['name']输出值
$date=mysql_fetch_assoc($query);
?>
<style>
*{margin:0; padding:0;}
.div1{
width:100%;
height:100px;
background:#FF3;
text-align:left;
line-height:100px;
font-size:20px;
font-weight:bold;
}
</style>
<div class="div1">后台系统</div>
<div align="center">发布修改</div>
<form id="form1" name="form1" method="post" action="re_wenzhangxiugai.php">
<table width="906" height="387" border="1" align="center">
<tr>
<th height="29" scope="col">标题</th>
<th scope="col"><label for="biaoti"></label>
<input name="biaoti" type="text" id="biaoti" value="<?php echo $date['标题']?>" />
<input name="id" type="hidden" value="<?php echo $date['ID']?>" />
</th>
</tr>
<tr>
<td height="24" align="center">作者</td>
<td align="center"><label for="zuozhe"></label>
<input type="text" name="zuozhe" id="zuozhe" value="<?php echo $date['作者']?>" /></td>
</tr>
<tr>
<td height="137" align="center">简介</td>
<td align="center"><label for="jianjie"></label>
<textarea name="jianjie" id="jianjie" cols="50" rows="10" ><?php echo $date['简介']?></textarea></td>
</tr>
<tr>
<td height="156" align="center">内容</td>
<td align="center"><textarea name="neirong" id="neirong" cols="50" rows="10" ><?php echo $date['内容']?></textarea></td>
</tr>
<tr>
<td height="27" colspan="2" align="center"><input type="submit" name="button" id="button" value="提交" /></td>
</tr>
</table>
</form>
举报