?
Path : /home/yogsadhna/public_html/admin/ |
Current File : /home/yogsadhna/public_html/admin/addCategory.php |
<? include "include/header.php"; if($_POST) { extract($_POST); $sql="select * from category where catName='$name'"; $num=$obj->count_row($sql); if($num==0) { $sql="insert into category (`catId`, `catName`) values ('', '$name')"; $obj->query($sql); $msg="Product Category has been Successfully Created"; } else $msg="This Product Category Already exist"; } ?> <!--main page--> <link href="style.css" rel="stylesheet" type="text/css"> <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"> <tr bgcolor="#FFFFFF" height="30"><td align="center" colspan="2"><strong>Add 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=""></td></tr> <tr height="40"><td colspan="2"> </td></tr> <tr><td colspan="2" align="center"><input name="submit" type="image" src="images/Create.jpg" class="submitbox" value="Create"></td></tr> </form> </table> </td> </tr> </table> <!--end main page--> <? include "include/footer.php";?>