kohjhjhصثقص5572hjkhk7872ثقصثقgdfgdg
Ele57885fddfg872782782782 hjkhj782dfgfghgقفغفغفقhfg555434536
/
home4
/
kisgavwq
/
gpplenergy.com
/
gpadmin
/
includes
/
Upload FileeE
HOME
<?php $required = "<font color='#FF0000' size='1'>*</font>"; $fdata = array(); $conn = mysqli_connect(SYSTEM_DBHOST,SYSTEM_DBUSER,SYSTEM_DBPWD,SYSTEM_DBNAME); /*************************************/ if ($_POST['stage'] == 2) { $date = date("Y-m-d"); $sql = "insert into tbl_subcategory set cat_id='" . str_replace("'", "'", $_POST['cmbcategory']) . "', subcategory_name='" . str_replace("'", "'", $_POST['txtsubcatname']) . "', remark='". str_replace("'", "'", $_POST['ssubcat']) ."', created_date='" . $date . "'"; //print $sql;exit; $rs = mysqli_query($conn, $sql); $msg = "Record Added Successfully."; print "<script>"; print "self.location = 'subcategory.php?msg=$msg';"; print "</script>"; } ?> <div class="content_header"> <div class="heading flleft">Add New Subcategory</div> <div class="heading flright"><a href="<?=$_curpage?>">« Back</a></div> </div> <div class="bodycontent"> <form name="form1" method="post" action="" onsubmit="return validate();"> <?php if ($res['id'] == "") { ?> <input type="hidden" name="stage" value="2"> <?php } else { ?> <input type="hidden" name="subcategory" value="3"> <input type="hidden" name="id" value="<?php print $res['id'] ?>"> <?php } ?> <input type="hidden" name="act" value="addsubcategory"> <div id="validation_div" class="validation_error"></div> <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center"> <tr> <td align="left" class="label">Category Name </td> <td align="center">:</td> <td align="left"> <select name="cmbcategory" id="cmbcategory"> <option value="">--Select--</option> <?php $category_query=mysqli_query($conn, "select * from tbl_category order by category_name asc "); while($crow=mysqli_fetch_assoc($category_query)){ ?> <option value="<?php echo $crow['id']; ?>"><?php echo $crow['category_name']; ?></option> <?php } ?> </select> </td> </tr> <tr> <td align="left" class="label">Subcategory Name <?=$required?></td> <td align="center">:</td> <td align="left"><input type="text" name="txtsubcatname" size="50" /></td> </tr> <tr> <td align="left" class="label">Remark <?=$required?></td> <td align="center">:</td> <td align="left"><input type="text" name="ssubcat" size="50" /></td> </tr> <tr> <td colspan="3" align="center"><p><INPUT type="submit" value="Add Subcategory" class="button" /></p></td> </tr> </table> </form> </div>