<?php include('up_index.php');?>
<script language="javascript">
$(document).ready(function(e) {
	$("#form_category").click(function(){
		history.back();
	});
});
</script>

<center>
    <br/>
		 <br/>
	<script src="show.js"></script>
	 <div class="table_product_show">
	 <br/>
    <table width="200" border="0">
  <tr>
	<td><a href="menu_admin.php"><div class="link3">จัดการระบบ</div></a></td>
    <td><a class="alink" href="add_product.php"><div class="link3">เพิ่มสินค้า</div></a></td>
	<td><div class="link3" id="form_category"><font color="#FFFFFF">กลับ</font></div></td>
  </tr>
</table>
    <br/>

<?php
$sql2 = "select * FROM  category WHERE id_category  = 	'".$_GET['id_category']."' ";
			$result2 = mysql_query($sql2);
			while ($category = mysql_fetch_array($result2))
			{	?>


            	

<form id="category" name="category" method="post" action="save_update_category.php">
  <table id="formcategory" width="446" border="0" cellpadding="1" cellspacing="1">
  <tr>
    <td width="161">รหัสประเภทสินค้า :</td>
    <td width="269"><input name="id_category" type="text" id="id_category" value="<?=$category['id_category'];?>" size="5" maxlength="10" readonly="readonly" /><span id="id_categoryok"  style="color: red"></span></td>
    </tr>
  <tr>
    <td>ประเภทสินค้า :</td>
    <td><input name="name_category" type="text" id="name_category" value="<?=$category['name_category'];?>" maxlength="100" /></td>
    </tr>
  <tr>
    <td>รายละเอียด :</td>
    <td><textarea name="detail" cols="30" rows="7" id="detail"><?=$category['detail'];?>
    </textarea></td>
    </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="button" id="button" value="บันทึก" />
      <input type="reset" name="button2" id="button2" value="Reset" /></td>
    </tr>
</table>
		<?php	}	?>
</form>
<br/>
</div>
</center>
<?php include('down_index.php'); ?>