<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>admin</title>
<style type="text/css">
</style>
</head>
<body>
<?php
$db=new mysqli('localhost','root','11111111','xuyuanqiang')or die("unable to db");
$query="select * from yuanwang";
$result=$db->query($query);
echo '<table border="1">';
echo '<tr>'.
'<td>编号</td>'.
'<td>愿望</td>'.
'<td>地址</td>'.
'<td>昵称</td>'.
'<td>时间</td>'.
'<td></td>';
while($row=$result->fetch_row()){
echo '<tr>'.
'<td>'.$row[0].'</td>'.
'<td>'.$row[1].'</td>'.
'<td>'.$row[2].'</td>'.
'<td>'.$row[3].'</td>'.
'<td>'.$row[4].'</td>'.
'<td><a href="db.php?op=1&id='.$row[0].'">删除</a></td>';
}
echo '</table>';
$result->free();
?>
<br>
<br>
<form action="db.php" method="get">
新的一年你有什么愿望呢?<br>
<input type="hidden" name="op" value="2">
<textarea name="content" rows="10" cols="30" id="" cols="30" rows="10"></textarea>
<br><br>
您的地址:<input type="text" name="local"><br><br>
您的名字:<input type="text" name="username"><br><br>
<input type="submit">
</form>
</body>
</html>
自己写的一整套PHP后台源码
1星 需积分: 50 86 浏览量
2018-01-11
15:56:07
上传
评论 4
收藏 2KB RAR 举报
alon2006
- 粉丝: 0
- 资源: 4