<?php

 if($conn == false){
	 echo 'Δεν υπαρχει συνδεση...<br>';
	// dbConnect();
}
 
 $Eponymia = '';$AFM='';$DOY='';$Til='';$Kinito='';$email='';
	
   $query2 = "SELECT * FROM pelates WHERE IDPelati=" . $IDPelati ;
  $result2 = mysqli_query($conn, $query2);
      $rs2 = mysqli_fetch_assoc($result2);
	
if ($rs2){
	$Eponymia=$rs2['Eponymia'] ;
	$AFM=$rs2['AFM'];
	$DOY=$rs2['DOY'];
	$Til=$rs2['Til'];
	$Kinito=$rs2['Kinito'];
	$email=$rs2['email'];
}

?>

	<div id="block_container" style="padding-top:0px; ">  
	<div id="bloc1" class="fieldset2" > 
	<table border="0" width="100%" >
		<tr>
			<td colspan="3">
			<label for="Eponymia">Επωνυμία πελάτη</label>	
			<div class="vscombo-div" >
			  <input type="text" id="Eponymia" name="Eponymia" required value="<?php echo $Eponymia;?>" >
			  <a class="vscombo_button" onclick="javascript:cbo_select('pelates','');"></a>
			</div>
		</tr>
		<tr>
			<td><label for="AFM">ΑΦΜ</label>	<input type="text" id="AFM" name="AFM" value="<?php echo $AFM;?>"></td>
			<td width="10px"></td>
			<td><label for="DOY">ΔΟΥ</label>	<input type="text" id="DOY" name="DOY" value="<?php echo $DOY;?>"></td>
		</tr>
		<tr>
			<td><label for="Tilefono">Τηλέφωνο</label><input type="text" id="Tilefono" name="Tilefono" maxlength="50" value="<?php echo $Til;?>"></td>
			<td width="10px"></td>
			<td><label for="Kinito">Κινητό</label>	<input type="text" id="Kinito" name="Kinito" value="<?php echo $Kinito;?>"></td>	
		</tr>
		<tr>
			<td colspan="3">
			<label for="email">email</label><input type="text" id="email" name="email"   value="<?php echo $email;?>">
			</td>
		</tr>
 	 
	</table>
 
</div>

 		
<div id="bloc2" class="fieldset2"  > 
 
 
</div>
<!-- =============================== basika stoixeia part2 =======================-->

  
 </div>
 
<script language="JavaScript" type="text/JavaScript">
 var ep = document.getElementById("Eponymia");
ep.addEventListener("keypress", function(event) {
	 
  if (event.key === 'Enter') {
	   event.preventDefault(); 
	   var fw="?pelates_select@FindWhat="+ep.value;
       cbo_select('pelates',fw);
   }
});
 </script>