为了账号安全,请及时绑定邮箱和手机立即绑定

问个问题啊

这个修改  我能看懂  可是具体修改 那个 就只能 在修改的 页面里面 换ID值么?where id=4 或者 where id=10 这多麻烦啊....

正在回答

2 回答

能贴个mysql代码么?

0 回复 有任何疑惑可以回复我~
#1

慕姐4424294 提问者

贴了 不能让 第四行 那个 where id=8 活起来么
2015-12-11 回复 有任何疑惑可以回复我~
#2

慕姐4424294 提问者

非常感谢!
2015-12-11 回复 有任何疑惑可以回复我~
#3

lynhao 回复 慕姐4424294 提问者

^_^
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>


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
PHP与MySQL关系大揭秘
  • 参与学习       72504    人
  • 解答问题       978    个

让我们一起走上探秘之旅,找寻php和mysql恋爱的真谛

进入课程

问个问题啊

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号