天天看點

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‘] ?>

       

<a href="php_mysql_del.php?messageid=<?php echo $row[‘id‘]

?>">删除</a></td>

}

用table顯示出來,也可以連接配接到資料庫