<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?php 
  
			$dbh=mysql_connect("localhost","olympicv","olym8y");
			mysql_select_db("olympicv_olympic",$dbh);
	
if ($submit) {
$sql="DELETE FROM GUESTBOOK  WHERE id=$id";
	$result=mysql_query($sql);	
?><br>
<table width="560" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#CC0000" align="center" class="ttext">
  <tr> 
    <td bgcolor="#CCCCCC" bordercolor="#CCCCCC">
      <div align="center" class="">Η ΔΙΑΓΡΑΦΗ ΤΟΥ GUEST ΕΓΙΝΕ</div>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">
      <p>&nbsp;
      <table width="511" border="0" cellspacing="0" cellpadding="5" align="center" class="ttext">
        <tr> 
          <td align="center" valign="top"> O GUEST : 
            <?php echo $surname ?>
            διαγράφηκε από τη βάση </td>
        </tr>
      </table>
                  
      <p>&nbsp;</p>
    </td>
  </tr>
</table>
<meta http-equiv="refresh" content="0;URL=allguestbook.php">
<?php
} else {	
	

?>
<?php
	 	$result = mysql_query("SELECT * FROM  GUESTBOOK  WHERE id=$id",$dbh);
			$myrow=mysql_fetch_array($result); 
			$name=$myrow['name'];
			$surname=$myrow['surname'];
?><form name="newproductform1" method="post" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
  <table width="560" border="0" cellspacing="0" cellpadding="0" align="center" class="ttext">
    <tr> 
      <td colspan="2"> 
        <div align="center">ΔΙΑΓΡΑΦΗ GUEST</div>
      </td>
    </tr>
    <tr> 
      <td colspan="2">
        <p>Αν θέλετε να διαγραφεί η o Guest : 
          <?php echo $name ?> <?php echo $surname ?>
          πατήστε το κουμπί (submit)</p>
        <p><input type="hidden" name="id" value="<?php echo $id ?>">
        <input type="hidden" name="surname" value="<?php echo $surname ?>"></p>
      </td>
    </tr>
    <tr> 
      <td width="192"> 
        <input type="submit" name="submit" value="Submit">
      </td>
      <td width="368">&nbsp;</td>
    </tr>
  </table>

</form>
<?php } ?>

</body>
</html>
