PHP Scripts for Guestbook and Comment Box

Free PHP Guestbook and Comment Box. You can use it as a guestbook or comment box. This script is designed with captcha to avoid spams and supports smiley.

PHP Guestbook and Comment box has the following features.
Easily changeable template
Can be implemented easily
Comments auto approve or moderated (gb_config)
Easily changeable error messages from gb_config
Can hide any fields at any time from gb_config

 

<?
/************************************

Script : Free Guest Book and comment box
Website : http://www.agrizlive.com

Script is provided Under GPU Non-Commercial License
Agrizlive.com doesn't provide any WARRANTY for this script
**************************************/

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
<head>
<title>Guestbook and Comment Box</title>
<style>
#author, #email, #url {
background: none repeat scroll 0 0 #F4F4F4 !important;
border: 1px solid #DDDDDD;
color: #006699;
font-family: Arial,Tahoma,Verdana;
font-size: 12px;
margin: 5px 5px 0 0;
padding: 3px 0 3px 3px;
width: 250px;
}
.agriz_gb {
color: #666666;
font-family: Verdana,Arial,Tahoma;
font-size: 12px;
line-height: 20px;
width: 500px;
}
#comment {
background: none repeat scroll 0 0 #F4F4F4 !important;
border: 1px solid #DDDDDD;
color: #006699;
font-family: Arial,Tahoma,Verdana;
font-size: 12px;
height: 150px;
margin: 5px 0;
padding: 3px 0 3px 3px;
width: 98%;
}
#submit {
background: none repeat scroll 0 0 #2C343F;
border: 1px solid #2C343F;
color: #FFFFFF;
font-size: 11px;
margin: 0;
padding: 2px 5px;
text-decoration: none;
text-transform: uppercase;
}
.comment{
background: none repeat scroll 0 0 #F4F4F4;
border: 1px solid #DDDDDD;
padding: 10px 5px 10px 10px;
margin: 15px 0 5px;
width: 98%;
}
</style>
</head>
<body>
<div>
<?
while($value_gb_comment = mysql_fetch_array($result_gb_comments))
{
$comment = stripslashes($value_gb_comment['guestbook_message']);
$result_smiley = getSmileysFE();
while($value_smiley = mysql_fetch_array($result_smiley))
{
$comment = str_replace($value_smiley['short_cut']," <img src='gb_admin/smiley/".$value_smiley['smiley_image']."' alt='".$value_smiley['smiley_name']."'/> ",$comment);
}
?>
<div id="comment-506">
<?
if($display_username_box){
?>
<div>
<cite><? if($display_user_website &amp;&amp; $value_gb_comment['user_website'] != ""){?><a rel="external <?if($website_nofollow){echo "nofollow";}?>" onclick="" href="<?=$value_gb_comment['user_website']?>"><?}?><?=stripslashes($value_gb_comment['user_name'])?><? if($display_user_website &amp;&amp; $value_gb_comment['user_website'] != ""){?></a><?}?></cite>
<span>says:</span>
</div>
<?
}
?>
<div>
<small><?=date("F j, Y, g:i a",strtotime($value_gb_comment['date']));?></small>
</div>
<div>
<p><?=$comment;?></p>
</div>
</div>
<?
}
?>
<div id="respond">
<h3 id="reply-title">Comment</h3>
<?if(isset($status)){?><p><?=$status?></p><?}?>
<form id="commentform" method="post" action="">
<?
if($display_username_box){
?>
<p>
<input type="text" size="30" value="" name="author" id="author">
<label for="author">Name</label> <span>*</span>
</p>
<?
}
if($display_user_email)
{
?>
<p>
<input type="text" size="30" value="" name="email" id="email">
<label for="email">Email</label> <span>*</span>
</p>
<?
}
if($display_user_website)
{
?>
<p>
<input type="text" size="30" value="" name="url" id="url">
<label for="url">Website</label>
</p>
<?
}
?>
<p>
<textarea rows="8" cols="45" name="comment" id="comment"></textarea>
</p>
<p>Powered by <a href="http://www.agrizlive.com" target="_blank" title="Agriz PHP Scripts">Free PHP Scripts</a></p>
<?
if($captcha)
{
require_once("gb_admin/recaptchalib.php");
echo recaptcha_get_html($publickey);
?>
<?
}
?>
<p>
<input type="submit" value="Post Comment" id="submit" name="submit">
<input type="hidden" id="comment_post_ID" value="132" name="comment_post_ID">
</p>
</form>
</div>
</div>
</body>

&amp;nbsp;

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>