echo "li年领:".$rs-age."/li\n";
echo "li年领:".$rs-sex."/li\n";
echo "liQQ:".$rs-qq."/li\n";
echo "li头像: img src="/images/defaultpic.gif";
echo "li留言时间:".$rs-time."/li/ul/div\n";
}
mysql_close(); //关闭与数据服务间的连接
?
谁能提供一个PHP留言板源码input.htm
html
head
meta http-equiv="Content-Language" content="zh-cn"
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
titleinput/title
/head
body
form method="POST" action="receive.php"
p您的姓名: input type="text" name="T1" size="20"/p
p您的性别:男input type="radio" value="https://www.04ip.com/post/0" name="R1"
女input type="radio" name="R1" value="https://www.04ip.com/post/1"/p
p您的EMAIL:input type="text" name="T2" size="35"/p
p您的留言内容:/p
p textarea rows="16" name="S1" cols="45"/textarea/p
p /p
pinput type="submit" value="https://www.04ip.com/post/提交" name="B1"
input type="reset" value="https://www.04ip.com/post/重置" name="B2"/p
/form
/body
/html
receive.php
?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$ip=getenv(REMOTE_ADDR);
$sql = "INSERT INTO `guestbook`.`gbook` (`id`, `name`, `sex`, `email`, `info`, `ip`, `time_at`) VALUES (NULL, '$T1', '$R1', '$T2', '$S1', '$ip', NOW());";
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
mysql_query($sql);
$result=mysql_query("select * from $table");
while ($arr=mysql_fetch_array($result))
{
if ($arr[2]==0)
$gender='先生';
else
$gender='女士';
?
html
head
meta http-equiv="Content-Language" content="zh-cn"
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
titleReceive/title
/head
body style="background-attachment: fixed"
table border="1" width="100%" id="table1" bgcolor="#FFFFFF"
tr
td bordercolor="#FFFFFF" bgcolor="#C0C0C0"?=$arr[6]?(?=$arr[5]?)p?=$arr[1]? ?=$gender?a href="https://www.04ip.com/post/?=$arr[3]?"?=$arr[3]?/a
写到:/td
【php留言版数据库的代码 php留言版数据库的代码是什么】/tr
tr
td?=$arr[4]?p /p
pa href="https://www.04ip.com/post/del.php?id=?=$arr[0]?"[删除]/a
a href="https://www.04ip.com/post/modify.php?id=?=$arr[0]?"[修改]/a]/td
/tr
/table
/body
/html
?php
echo 'p';
echo 'p';
}
?
html
head
meta http-equiv="Content-Language" content="zh-cn"
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
title新建网页 1/title
/head
body
pa href="https://www.04ip.com/post/input.htm"继续留言/a/p
/body
/html
del.php
?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$sql="DELETE FROM $table WHERE id=$id";
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
$result=mysql_query($sql);
if ($result)
echo "删除成功";
else
echo "删除失败";
?
html
head
meta http-equiv="Content-Language" content="zh-cn"
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
title新建网页 1/title
/head
body
pa href="https://www.04ip.com/post/receive.php"返回首页/a/p
/body
/html
modify.php
?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$ip=getenv(REMOTE_ADDR);
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);
$result=mysql_query("select * from $table where id=$id");
$arr=mysql_fetch_array($result);
推荐阅读
- 网络游戏末日沙城,末日沙城最新开区
- 电脑网络状态怎么更改名称,电脑网络状态怎么更改名称呢
- flutter桌面程序开发,flutter编写桌面开发
- gis面状要素提取中心线,arcgis提取面中心线
- go语言wait go语言walk开发文档
- 上海斐讯路由器怎么进不去,上海斐讯路由器网址
- 阿里云收件服务器,阿里云收件服务器主机名
- 体育课沙包游戏,体育课沙包游戏有哪些
- C语言累加的函数 c语言求累加和的公式计算