<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="UPDATE PAGES SET TITLE='$TITLE', TITLEGR='$TITLEGR', DESCRIPTIONUK='$DESCRIPTIONUK', DESCRIPTION='$DESCRIPTION'  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="">Η ΑΛΛΑΓΗ ΕΓΙΝΕ</div>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">

    </td>
  </tr>
</table>
<meta http-equiv="refresh" content="0;URL=edit_page.php?ID=<?php echo $ID ?>">
<?php
} else {	
			$result = mysql_query("SELECT * FROM PAGES  WHERE ID=$ID",$dbh);
			$myrow=mysql_fetch_array($result); 
			$DESCRIPTION=$myrow['DESCRIPTION'];
			$DESCRIPTIONUK=$myrow['DESCRIPTIONUK'];
			$TITLE=$myrow['TITLE'];
		   $TITLEGR=$myrow['TITLEGR'];
?>
<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">&nbsp;</td>
    </tr>
    <tr> 
      <td width="192">Title 
        <input type="hidden" name="ID" value="<?php echo $ID?>">
      </td>
      <td width="368"> 
        <input type="text" name="TITLE"  maxlength="254" value="<?php echo $TITLE ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">Τίτλος </td>
      <td width="368"> 
        <input type="text" name="TITLEGR"  maxlength="254" value="<?php echo $TITLEGR ?>">
      </td>
    </tr>
    <tr> 
      <td width="192">Κείμενο english</td>
      <td width="368"> 
        <textarea name="DESCRIPTIONUK" cols="55" rows="5"><?php echo $DESCRIPTIONUK ?></textarea>
      </td>
    </tr>
    <tr> 
      <td width="192">Κείμενο</td>
      <td width="368"> 
        <textarea name="DESCRIPTION" cols="55" rows="5"><?php echo $DESCRIPTION ?></textarea>
      </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>
