?
Path : /home/yogsadhna/public_html/admin/ |
Current File : /home/yogsadhna/public_html/admin/editCategory.php |
<? include "include/header.php"; if($_POST) { extract($_POST); $sql="select * from category where catName='$name' and `catId` !='$id'"; $num=$obj->count_row($sql); if($num==0) { $obj->query("update category set `catName`='$name' where `catId`='$id'"); $msg="Product Category has been Successfully Changed"; } else $msg="This Product Category Name Already exist"; } if($_GET['idd']) { $res=$obj->query("select * from category where `catId`='".$_GET['idd']."'"); $cat=$obj->fetch_query($res); } ?> <!--main page--> <table width="100%" border="0" cellspacing="2" cellpadding="3"> <tr> <td width="20%" class="border" valign="top"><? include "include/leftmenu.php" ?></td> <td bgcolor="#e6e4ef" id="welcomenote" valign="top"> <table cellpadding="5" cellspacing="0" border="0" class="normaltext" align="center" width="70%"> <tr bgcolor="#FFFFFF" height="30"><td align="center" colspan="2"><strong>Edit Product Category </strong></td></tr> <tr height="40"><td colspan="2" id="error"> <?=$msg?></td></tr> <form name="cat" action="" method="post" onSubmit="return valid()"> <tr bgcolor="#EEEEEE"><td class="textboxcap">Name Of Category</td><td><input name="name" class="inputbox" value="<?=$cat->catName?>"></td></tr> <tr height="40"><td colspan="2"> </td></tr> <tr><td colspan="2" align="center"> <input name="id" value="<?=$_GET['idd']?>" type="hidden" /> <input name="submit" type="image" src="images/Submit.jpg" class="submitbox" value="Create"></td></tr> </form> </table> </td> </tr> </table> <!--end main page--> <? include "include/footer.php";?>