2 Star 0 Fork 0

winp/mysql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
edit.php 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
winp 提交于 2016-10-22 13:03 +08:00 . 2016.10.22
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>eidt</title>
</head>
<body>
<?php
$id = $_GET['id'];
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$conn = mysql_connect("127.0.0.1","root","");
if (!$conn) {
echo "链接错误";
exit();
}
if (!mysql_query("use messageboard",$conn)) {
echo "数据库链接失败";
exit();
}
mysql_query("set names utf8",$conn);
$resourse = mysql_query("select * from data",$conn);
$data = array();
while ($row = mysql_fetch_row($resourse)){
$data[] = $row;
}
?>
<h2>吴松的留言板</h2>
<form method="post" action="edit_save.php">
<input type="hidden" name="id" value="<?php echo $id?>">
<table>
<tr>
<td>姓名</td>
<td><input type="text" name="name" value="<?php echo $data[1]?>" style="width:400px; height:20px; "></td>
</tr>
<tr>
<td>内容</td>
<td><textarea style=" width:400px; " rows="5" name="write"><?php echo $data[2]?></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" /></td>
</tr>
</table>
</form>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/winp/mysql.git
git@gitee.com:winp/mysql.git
winp
mysql
mysql
master

搜索帮助