PHP操作数据库
时间:2014-05-03 22:13:33
收藏:0
阅读:394
PHP具有很强大的功能,能添加,修改和查找数据库里面的数据,如:
<body>
<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>
</tr>
<?php
}
?>
</table>
</body>
评论(0)