Guest Book
$dbh = mysql_connect('localhost','root','kidilolkidilam') or die("Unable to connect!");
mysql_select_db('test',$dbh) or die("Cannot select database Volume!");
$sqlstr="select id,name,email,homepagetitle,homepageurl,location,comments,date_format(dateofentry,'%d/%m/%Y') as date from guestbook order by id";
$res=mysql_query($sqlstr);
if(mysql_num_rows($res)>0){
while($rs=mysql_fetch_array($res)){
?>
| Date |
echo $rs[date]?> |
| Name |
echo $rs["name"]?> |
| E-Mail Address |
echo $rs["email"]?> |
| Lodge Name |
echo $rs["homepagetitle"]?> |
| Lodge URL |
echo $rs["homepageurl"]?> |
| Location |
echo $rs["location"]?> |
| Comments |
echo $rs["comments"]?> |
}
}else{
echo "
No one has yet signed the GuestBook";
}
?>