特点:
支持oicq头像,自动分页,显示留言人ip,email合法性验证,方便安全的留言管理,
没有复杂函数,初学者也很容易看懂。
程序示例:http://medguider.51.net/notebook/
完整程序下载(包括图片)http://medguider.51.net/download/notebook.zip
程序清单:
config.php 配置文件 mysql.txt 数据库文件 index.php 显示留言主程序 addnote.php 添加留言 delnote.php 删除留言
mysql.txt
create table notebook (name char(6),email varchar(35),time char(30),face char(2),ip varchar(16),title varchar(255),nnote text);
//留言簿 name 姓名 email time 时间 face 头像 ip title 标题 nnote 内容
config.php
//这里改为自己的数据库用户名与密码
$db = mysql_connect("localhost", "root");
mysql_select_db("test",$db);
//这里改为自己的管理用户名和密码
$username="demo";
$password="demo";
?>
index.php
|
for ($i=0;$i<=($x-1);$i++) { $name=mysql_result($result,$i,'name'); $email=mysql_result($result,$i,'email'); $face=mysql_result($result,$i,'face'); $face='image/face/icon'.$face; //用户头像 $time=mysql_result($result,$i,'time'); $ip=mysql_result($result,$i,'ip'); $title=mysql_result($result,$i,'title'); $nnote=mysql_result($result,$i,'nnote'); echo "
} mysql_close($db); ?> The above introduces the guestbook one that supports oicq avatar, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.
Previous article:How to withdraw housing provident fund. An example of extracting text from multiple news items at the same time.
Next article:premiere pro cs4 download PHP4 practical application experience 7
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
There is no output in the parent window
document.onclick = function(){ window.opener.document.write('I am the output of the child ...
From 2024-04-18 23:52:34
0
1
1284
PX automatic conversion to REM error
<style>html { font-size: calc(100vw / 3.75); }...
From 2024-04-16 09:34:16
0
0
4687
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|