<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 echo $email ?>
<?php 
			$dbh=mysql_connect("localhost","olympicv","olym8y");
			mysql_select_db("olympicv_olympic",$dbh);
	
if ($submit) {



	$sql="UPDATE ADDRESSBOOK  SET list_choice='$list_choice', realname='$realname', email='$email' , Phone_Fax_Number='$Phone_Fax_Number' , Country_Name='$Country_Name' , comments='$comments'  , type='$type' , code='$code'    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="">Η ΑΛΛΑΓΗ ΣΤΟ GUESTBOOK <b></b>ΕΓΙΝΕ</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 width="53" align="center" valign="top">
          
          </td>
                      
          <td align="left" width="246"> 
            <?php echo $TITLE ?>
          </td>
                      
          </tr>
                  </table>
                  
      <p>&nbsp;</p>
    </td>
  </tr>
</table>

<?php
} else {

 
	
			$result = mysql_query("SELECT * FROM ADDRESSBOOK  WHERE id='$id'",$dbh);
			$myrow=mysql_fetch_array($result); 
		
			$id=$myrow['id'];
			$list_choice=$myrow['list_choice'];
			$realname=$myrow['realname'];
			$email=$myrow['email'];
			$Phone_Fax_Number=$myrow['Phone_Fax_Number'];
			$Country_Name=$myrow['Country_Name'];
			$comments=$myrow['comments'];
			$type=$myrow['type'];
?>

<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 width="192">realname 
        <input type="hidden" name="id" value="<?php echo $id?>">
      </td>
      <td width="368"> 
        <input type="text" name="realname"  maxlength="254" value="<?php echo $realname ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">list_choice</td>
      <td width="368"> 
        <input type="text" name="list_choice"  maxlength="254" value="<?php echo $list_choice ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">email</td>
      <td width="368"> 
        <input type="text" name="email"  maxlength="254" value="<?php echo $email ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">Phone_Fax_Number</td>
      <td width="368"> 
        <input type="text" name="Phone_Fax_Number"  maxlength="254" value="<?php echo $Phone_Fax_Number ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">Country_Name</td>
      <td width="368"> 
        <input type="text" name="Country_Name"  maxlength="254" value="<?php echo $Country_Name ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">comments</td>
      <td width="368"> 
        <textarea name="comments" cols="44" rows="6"><?php echo $comments ?></textarea>
      </td>
    </tr>
	<tr> 
      <td width="192">type</td>
      <td width="368"> 
        <input type="text" name="type"  maxlength="254" value="<?php echo $type ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">code</td>
      <td width="368"> 
       <?php echo $code ?>
	     <input type="hidden" name="code" value="<?php echo $code?>">
      </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>
