<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
 $Baglanti=odbc_connect("Odbc_Deneme","Admin","1234");
 
 $sql_Sorgusu="Select * From Kisiler Where Adi='".$_GET['Adi']."'";
 $RecordSet=odbc_exec($Baglanti,$sql_Sorgusu); 
 
 
 if($_POST['Kontrol_Ad']) {
	 $sql_Sorgusu_Guncelle="Update Kisiler Set Adi='".$_POST['Adi']."', Telefon='".$_POST['Telefon']."', Adres='".$_POST['Adres']."' Where Adi='".$_POST['Kontrol_Ad']."'";
     $Calistir=odbc_exec($Baglanti,$sql_Sorgusu_Guncelle);  
	 header("Location: Sec.php");
	 }
 
 
 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>Untitled Document</title>
</head>

<body>
 <?php while (odbc_fetch_row($RecordSet))
 { ?>
<form id="form1" name="form1" method="post" action="">
<table>
  <tr>
    <td>Adư</td>
    <td><input type="text" name="Adi" id="Adi" value="<?php echo odbc_result($RecordSet,"Adi"); ?>" /></td>
  </tr>
  <tr>
    <td>Telefon</td>
    <td><input type="text" name="Telefon" id="Telefon" value="<?php echo odbc_result($RecordSet,"Telefon"); ?>" /></td>
  </tr>
  <tr>
    <td>Adres</td>
    <td><input type="text" name="Adres" id="Adres" value="<?php echo odbc_result($RecordSet,"Adres"); ?>" /></td>
  </tr>
  <tr>
    <td><input type="hidden" name="Kontrol_Ad" id="Kontrol_Ad" value="<?php echo odbc_result($RecordSet,"Adi"); ?>" /></td>
    <td><input type="submit" name="button" id="button" value="Guncelle" /></td>
  </tr>
</table>
</form>
<?php 
}
 odbc_close($Baglanti);
?>
</body>
</html>