留言板網站源碼
Ⅰ 如何在本地搭建一個在線留言板的網站,源碼我已下載,軟體我下的是wampserver,不知道咋弄。
1、做好留言板的網頁,上傳。
2、寫好資料庫上傳。
3、調整一下就ok了。
input.htm
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>input</title>
</head>
<body>
<form method="POST" action="receive.php">
<p>您的姓名: <input type="text" name="T1" size="20"></p>
<p>您的性別:男<input type="radio" value="0" name="R1">
女<input type="radio" name="R1" value="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>
<p> <input type="submit" value="提交" name="B1">
<input type="reset" value="重置" 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">
<title>Receive</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="<?=$arr[3]?>"><?=$arr[3]?></a>>
寫到:</td>
</tr>
<tr>
<td><?=$arr[4]?><p> </p>
<p><a href="del.php?id=<?=$arr[0]?>">[刪除]</a>
<a href="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>
<p><a href="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>
<p><a href="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);
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>input</title>
</head>
<body>
<form method="POST" action="modify_ok.php?id=<?=$id?>">
<p>您的姓名: <input type="text" name="T1" size="20" value="<?=$arr[1]?>"></p>
<p>您的性別:
<?php
if ($arr[2]==0) echo '男<input type="radio" value="0" name="R1" checked>
女<input type="radio" name="R1" value="1"></p>';
else echo '男<input type="radio" value="0" name="R1">
女<input type="radio" name="R1" value="1" checked></p>';
?>
<p>您的EMAIL:<input type="text" name="T2" size="35" value="<?=$arr[3]?>"></p>
<p>您的留言內容:</p>
<p> <textarea rows="16" name="S1" cols="45" ><?=$arr[4]?></textarea></p>
<p> </p>
<p> <input type="submit" value="修改" name="B1">
<input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>
modify_ok.php
<?php
$user='root';
$password='123';
$db='guestbook';
$table='gbook';
$connect=mysql_connect('localhost',$user,$password);
mysql_select_db($db);;
$sql = "UPDATE `guestbook`.`gbook` SET `name` = '$T1', `sex` = '$R1', `email` = '$T2', `info` = '$S1' WHERE `gbook`.`id` = '$id' LIMIT 1;";
$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>
<p><a href="input.htm"><繼續留言></a></p>
</body>
</html>
Ⅲ 誰給我個網站留言板源碼,或者許願牆源碼,是不用登陸就可以留言的那種!!
留言板裡面的index.asp 裡面的代碼,是可以復制到給留言的頁面中的,主要是一個表格,接著呢就是一些參考的傳遞。
Ⅳ 求php留言板代碼,就是按提交後直接顯示在頁面的,在留言,再增加一條
[M][ftc=#EE1000][fts=6][ftf=Webdings]Y[/ft][/ft][/ft]
[ftc=#00BFF3]﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌﹌[/ft]
[ftc=#FFF100]對
自
己
好
點,
因
為
一
輩
子
不
長;[/ft]
[ffg,#F68E54,#FFFFFF]對
身
邊
的
人
好
點,因
為
下
輩
子
不
一
定
能
夠
遇
見。[/ft]
[ftc=#00BFF3]——————————————————————————
[ftc=#EE1D24]◣[/ft][ftc=#FFF100]◤[/ft]
[ftc=#37B400]◢[/ft][ftc=#00AEEF]◥[/ft][/M][M][/M][M][/M][M][/M][M][/M][M][/M]
[M][ftc=000000][/ft][/M][/ft][/ft][/ft][/ft][/ft][/ft][/ft][/ft][/ft][/ft][/M][/M][/M][/M][/M][/M][/M][/M][/M][/M][/M][/M][/M]
Ⅳ 誰能提供一個PHP留言板源碼
我自己有一個簡單的留言板系統,
裡面有簡單的增刪改查功能,需要會資料庫。
希望可以幫助到有緣的學習愛好者。
這是首頁index.php代碼:
<html>
<head>
<title>我的留言本</title>
<script type ="text/javascript">
function dodel(id){
if(confirm("確定要刪除嗎?")){
window.location="action.php?action=del&id="+id;
}
}
</script>
<style type = "text/css">
*{font-family:"微軟雅黑";}
body{
background:url(images/bg.gif);
}
a{color:#000;text-decoration:none;}
a:hover{text-decoration:underline;}
td{text-align:center;}
table{
border:3px solid #9b9b9b;
background:#E9E9E9;
}
td{
color:#660000;
}
</style>
</head>
<body>
<center>
<?php include("menu.php"); ?>
<h3>瀏覽新聞</h3>
<table width ="880" border="1" cellpadding="3">
<tr>
<th>新聞id</th><th>新聞標題</th><th>關鍵字</th><th>作者</th><th>發布時間</th><th>新聞內容</th><th>操作</th>
</tr>
<?php
//1.導入配置文件
require("dbconfig.php");
//2.鏈接mysql資料庫,選擇資料庫
$link = @mysql_connect(HOST,USER,PASS)or die("資料庫連接失敗!");
mysql_select_db(DBNAME,$link);
//3.執行查詢,並返回結果
$sql="select * from news order by addtime desc";
$result = mysql_query($sql,$link);
//4.解析結果集,並遍歷輸出
while($row = mysql_fetch_assoc($result)){
echo"<tr>";
echo"<td>{$row['id']}</td>";
echo"<td>{$row['title']}</td>";
echo"<td>{$row['keywords']}</td>";
echo"<td>{$row['author']}</td>";
echo"<td>{$row['addtime']}</td>";
echo"<td>{$row['content']}</td>";
echo"<td>
<a href='javascript:dodel({$row['id']})'>刪除</a>
<a href='edit.php?id={$row['id']}'>修改</a></td>";
echo"</tr>";
}
//5.釋放結果集
mysql_free_result($result);
mysql_close($link);
?>
</table>
</center>
</body>
</html>
Ⅵ 用DW網頁製作!留言板怎麼做!整個網頁只要有留言的就行,求源代碼!
<div id="apDiv2">
<table width="539" border="0">
<form id="form1" name="form1" method="post" action="">
<tr>
<td width="8"></td>
<td width="111"></td>
<td width="367"></td>
</tr>
<tr>
<td></td>
<td height="30"><div align="right" class="STYLE4">你的名字 :</div></td>
<td><label>
<input name="textfield" type="text" class="logininput" id="textfield" />
</label></td>
</tr>
<tr>
<td></td>
<td><div align="right"><span class="STYLE4">你的QQ :</span></div></td>
<td height="30"><label>
<input name="textfield2" type="text" class="logininput" id="textfield2" />
</label></td>
</tr>
<tr>
<td></td>
<td><div align="right"><span class="STYLE4"><span class="STYLE4"></span>你的郵箱 :</span></div></td>
<td height="30"><label>
<input name="textfield3" type="text" class="logininput" id="textfield3" />
</label></td>
</tr>
<tr>
<td height="120"></td>
<td><div align="right"><span class="STYLE4"><span class="STYLE4"></span>給我留言 :</span></div></td>
<td><label>
<textarea name="wenben02" cols="40" rows="6" id="wenben02"></textarea>
</label></td>
</tr>
<tr>
<td></td>
<td></td>
<td height="50">
<label>
<input name="button" type="submit" class="anniu" id="button" value="確 定" />
</label>
<label>
<input name="button2" type="reset" class="anniu" id="button2" value="重 置" />
</label>
</form>
</td>
</tr>
</table>
</div>
Ⅶ 求PHP留言板源碼,要有注冊登錄功能的,簡單實現就好
免費的可以在源碼網站找找我們也可以定做PHP+MYSQL製作
Ⅷ 編寫一個asp留言板源代碼
<link href="../../css/user.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../../js/common.js"></script>
<script language="JavaScript" src="../../js/ubbcode.js"></script>
<script language="JavaScript">
function formCheck()
{
if (document.theform.nickname.value == "")
{
alert("請填寫名字。");
document.theform.nickname.focus();
return false;
}
if (document.theform.content.value == "")
{
alert("請填寫留言內容。");
document.theform.content.focus();
return false;
}
theform.Submit.disabled=true;
return true;
}
function showimage()
{
document.images.faceimg.src=face_image[parseInt(document.theform.face.options[document.theform.face.selectedIndex].value)];
}
<body background="http://cache26.51.com/photo1/14/cf/amulostlove/1151766298434_1.jpg">
<center>
<IFRAME marginHeight=0 marginWidth=0 noResize scrolling=no frameBorder=0 src="http://ads.activepower.net/script/ad/ad_show.asp?group_id=8&bgcolor=ffffff" width=468 height=60>
</IFRAME>
</center>
<p> </p>
<form name="theform" onsubmit="return formCheck();" method="post" action="get_post.asp">
<TABLE width=550 border=0 align="center" cellPadding=0 cellSpacing=0>
<table width="550" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#ebebeb">
<tr>
<td class="pt9">
<p>*名字:
<input name="nickname" type="text" size="15" maxlength="12" class="inputbox1">
<br>
Email:
<input name="email" type="text" size="15" maxlength="45" class="inputbox1">
主頁地址:
<input name="hp_url" type="text" value="http://" size="22" maxlength="125" class="inputbox1">
</p>
</td>
<tr>
<td width="409" class="pt9"> <!--因為圖片連接的原因,本文件只適合include在script/dirname下的文件 -->
<img onClick=bold() src="../../images/icon_editor_bold.gif" width="23" height="22" alt="粗體" border="0"><img onClick=italicize() src="../../images/icon_editor_italicize.gif" width="23" height="22" alt="斜體" border="0"><img onClick=underline() src="../../images/icon_editor_underline.gif" width="23" height="22" alt="下劃線" border="0">
<img onClick=center() src="../../images/icon_editor_center.gif" width="23" height="22" alt="居中" border="0"><img onClick=hyperlink() src="../../images/icon_editor_url.gif" width="23" height="22" alt="超級連接" border="0"><img onClick=email() src="../../images/icon_editor_email.gif" width="23" height="22" alt="Email連接" border="0"><img onClick=image() src="../../images/icon_editor_image.gif" width="23" height="22" alt="圖片" border="0"><img onClick=flash() src="../../images/icon_swf.gif" width="23" height="22" alt="Flash圖片" border="0"><img onClick=showcode() src="../../images/icon_editor_code.gif" width="23" height="22" alt="編號" border="0"><img onClick=quote() src="../../images/icon_editor_quote.gif" width="23" height="22" alt="引用" border="0"><img onClick=list() src="../../images/icon_editor_list.gif" width="23" height="22" alt="目錄" border="0">
<br>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="pt9">
<tr>
<td width="40" valign="top">*留言:</td>
<td><textarea name="content" cols="50" rows="6" id="content"></textarea></td>
</tr>
</table>
<p align="center">
<input name="replyer" type="hidden" value="">
<input name="reply_content_id" type="hidden" value="">
<input name="userid" type="hidden" value="79444">
<input type="submit" name="Submit" value="確認留言" class="button1">
<input type="reset" name="Reset" value="取消重寫" class="button1">
</p></td>
</tr>
</table>
<p> </p>
</form>
<table width="550" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td width="88" valign="top">
<img src="http://img.mms.sohu.com/mms/1230/86/32486/p2.gif">
</td>
<td width="417"><TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 class="pt9">
<TBODY>
<TR>
<TD width=43 colSpan=2 height=29 rowSpan=2><IMG height=29
src="../../images/1_r2_c2.gif" width=43 border=0></TD>
<TD background=../../images/1_r2_c4.gif height=10></TD>
<TD width=37 colSpan=2 height=29 rowSpan=2><IMG height=29
src="../../images/1_r2_c6.gif" width=37 border=0></TD>
</TR>
<TR>
<TD height=19> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class="pt9"> <font class="filtertxt">dsfsd</font> </TD>
<TD width="168" align=right class="pt9"> </TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD width=10 background=../../images/1_r4_c2.gif></TD>
<TD width=27></TD>
<TD width="100%" height=50> <img src="../../images/blank.gif" width="5" height="5">
<br> fdsfsd<b>dfssdfsdf</b> <br> <img src="../../images/blank.gif" width="5" height="5"> </TD>
<TD width=22></TD>
<TD width=15 background=../../images/1_r4_c2.gif></TD>
</TR>
<TR>
<TD background=../../images/1_r4_c2.gif></TD>
<TD></TD>
<TD height=1><hr width="100%" size="1" noshade></TD>
<TD></TD>
<TD background=../../images/1_r4_c2.gif></TD>
</TR>
<TR>
<TD width=43 colSpan=2 height=26 rowSpan=2> <IMG height=26 src="../../images/1_r6_c2.gif" width=43 border=0></TD>
<TD align=right height=17>
<img src="../../images/no_home.gif" align="absmiddle"> <img src="../../images/no_email.gif" align="absmiddle"> <FONT color=#336600>[2006-7-17 21:24:00]</FONT> </TD>
<TD width=43 colSpan=2 height=26 rowSpan=2><IMG height=26
src="../../images/1_r6_c6.gif" width=37 border=0></TD>
</TR>
<TR>
<TD background=../../images/1_r2_c4.gif
height=9></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table>
<BR>
<form>
<table width="516" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width=100% border=0 cellspacing=1 cellpadding=2 class=pt9><tr><td height=13><img src=../../images/turnpage2_1.gif align=absmiddle border=0> <img src=../../images/turnpage2_2.gif align=absmiddle border=0> <b>1</b> | <img src=../../images/turnpage2_3.gif align=absmiddle border=0> <img src=../../images/turnpage2_4.gif align=absmiddle border=0></td><td class=pt9 width=140 align=right>共<font color=red>1</font>頁第<input type=text name=JumpPage maxlength=3 size=3>頁<input type=button value=轉頁 onClick="location.href='/script/user/list.asp?userid=79444&page=' + this.form.JumpPage.value;"></td></tr></table>
</td>
</tr>
</table>
</form>
Ⅸ 求一個php的留言板源碼
<?php
$name= $_POST['name'];
$id=$_POST['id'];
$neirong=$_POST['neirong'];
try{
$mysql=mysql_connect("localhost",'sd','sd,')
}
cateh{}
Ⅹ 最簡單php留言板源碼。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>無標題文檔</title>
</head>
<body>
<BR><BR>
<center><a href="admin_login.htm" target="_blank">留言管理</a> </center><BR><BR>
<br><br><br>
<form method="post" >
<p>姓名:
<input type="text" name="user_name" size="20">
</p>
<p><br>
電話:
<input type="text" name="user_tel" size="20">
</p>
<p><br>
留言:
<textarea name="user_post" rows="5" cols="20"></textarea>
</p>
<p>
<input type="submit" value="提交留言" name="Submit">
</p>
</form>
<br><br><br>
<font color="red">最新留言如下:<BR><BR></font>
<?php
if($_POST['Submit']){
$user_name=$_POST['user_name'];
$user_tel=$_POST['user_tel'];
$user_post=$_POST['user_post'];
$ah=$_POST['ah'];
$where=$_POST['where'];
$str.="姓名:".$user_name."\r\n電話:".$user_tel."\r\n留言:".$user_post;
$k=fopen("liuyanban.txt","w+");
fwrite($k,$str);
fclose($k);
echo "保存成功!";
}
?>
</body>
</html>