<?php  
include("ayar.php");
$kon=$_GET["kontrol"];
if($kon=="kategoriduzenle"){

if($_POST['ok']){

$ad=$_POST['ad'];

mysql_query("update kategoriler set kategoriler='".$ad."'   where id='".$_GET["id"]."'")or die(mysql_error());
echo "Kategori güncellendi.";
}
if($_GET["id"]){
	$b=mysql_fetch_assoc(mysql_query("select * from kategoriler where id='".$_GET["id"]."'"));
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<link href="css/emre.css" rel="stylesheet" type="text/css">
<form method="post" enctype="multipart/form-data" name="example"     action="<?php echo $_SERVER['REQUEST_URI'] ?>" ><table width="628" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td width="628">


<table width="468"  cellpadding="3" cellspacing="0" class="liste" id="tabloq"  style="BORDER-RIGHT: #d1d9e1 1px solid; BORDER-TOP: medium none; BORDER-LEFT: #d1d9e1 1px solid; BORDER-BOTTOM: #d1d9e1 1px solid" align="center" bordercolor="#000066">
  <tr>
    <td colspan="3" class="tablobaslik">Kategori Ekleme</td>
    </tr>
  <tr>
    <td width="156" class="detay">Kategori Ad&#305; </td>
    <td width="298"><input name="ad" type="text" class="tool" id="ad" size="50" value="<?=$b["kategoriler"];?>">    </td>
  </tr>
  <tr>
    <td colspan="3">
        <div align="center">
          <input name="ok" type="submit"  class="buton" id="ok" value="Güncelle">
        </div>    </td>
    </tr>
</table>
<br>
<script language="JavaScript" type="text/JavaScript">
var windowNesnesi
var as;
function pencere(as){

windowNesnesi = window.open("yeni.php?id="+as, "YeniPencere", "toolbar=0, width=600, height=400,left=160,top=20, resizable=1")
}
    </script>

   &nbsp;</td>
  </tr>
</table></form>
  <?
	}
?>