// Connect to Database and select the database to use $dbi = mysql_connect('localhost', 'acerh_romeo', 'rxMi42@8') or die("I cannot connect to the database. Error :" . mysql_error()); mysql_select_db('acerho_romeo',$dbi); $id=$_GET['id']; if ($id=='') $id=$_POST['id']; if ($pass=='') $pass=$_POST['pass']; $pass=$_GET['pass']; $name = $_POST["name"]; $email = $_POST["email"]; $country = $_POST["country"]; $comment = $_POST["comments"]; $msg=''; $mailBody=''; if ($approveguestbook=='YES') { $sql="UPDATE guestbook set approved=1 where id=".$id." and passid=".$pass; $result = mysql_query($sql,$dbi); $msg="
Your Details have been added to the database. We will read your comment and will post it at soon as possible at the guestbook Thank you for your visit. "; $msg.=" Click here to go back to the guestbook |
} else {
$sql='SELECT name,country,v_comment,insertdate FROM guestbook where approved=1 order by insertdate desc';
$result = mysql_query($sql,$dbi);
$st.='
|
---|
Guest Book |
Contact Us |
|
7-9 Menekleous & Sokratous Str.
(Old Town) - 851 00 Rhodes
Tel: +30 22410 25186 - 74402 |
![]() |
function showdate($tdate) { if ($tdate!=''){ return substr($tdate,8,2)."/".substr($tdate,5,2) ."/". substr($tdate,0,4)."