form

form表单连接数据库列如:

<form action="php_mysql_add.php" method="post">

用户名: <input type="text" name="user"/> <br/>
标题: <input type="text" name="title"/> <br/>
内容: <textarea name="content" id="" cols="30" rows="10"></textarea> <br/>
<input type="submit" name="submit" value="发布留言"/> <br/>

</form>

form里面写要上传的东西,上传到哪里所到的位置:

<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<?php
while($row = mysql_fetch_array($result)){
?>
<tr bgcolor="#eff3ff">
<td>标题:<?php echo $row['title'] ?> 用户:<?php echo $row['user'] ?></td>
</tr>
<tr bgColor="#ffffff">
<td>内容:<?php echo $row['content'] ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="php_mysql_del.php?messageid=<?php echo $row['id'] ?>">删除</a></td>
</tr>

<?php
}
?>

用TABLE显示出来,也可以连接到数据库

posted @ 2014-04-27 17:39  三月迷离  阅读(91)  评论(0编辑  收藏  举报