<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title"><?php if($isEdit){ echo 'Edit Product Category';} else { echo 'Add Product Category'; }?></div>
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=manage_product_category">Product Category</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Add Product Category</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header><?php if($isEdit){ echo 'Edit Product Category';} else { echo 'Add Product Category'; }?></header>                                    
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($error) && $error!='') { ?> 
                                	<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } else if(isset($success) && $success!=''){ ?>                                		
                                		<div class="alert alert-success"><?php echo $success; ?></div>
                                	<?php } else if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo $_REQUEST['success']; ?></div>
                                	<?php } ?>
                                	                                	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post" enctype="multipart/form-data">
                                        <div class="form-body">
                                        	                               	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Select Parent Category<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <select name="parent" id="parent" >
                                                    	<option value="">--Select Parent--</option>
										              <?php if(mysqli_num_rows($parentRs)>0){
										              	while($parentRec = mysqli_fetch_array($parentRs)){ ?>
										              	<option value="<?php echo $parentRec['id']; ?>" <?php if(isset($_POST['parent']) && $_POST['parent']==$parentRec['id']) { echo 'selected="selected"'; } else if(isset($resEdit['parent_id']) && $resEdit['parent_id']==$parentRec['id']){ echo 'selected="selected"'; } ?> ><?php echo $parentRec['name']; ?></option>
										              <?php } } ?>
										            </select>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Category Name<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                                                                                                                                   
                                                        <input name="name" type="text" id="name" class="form-control" value="<?php if(isset($_POST['name'])) { echo htmlentities(($_POST['name']), ENT_QUOTES); } else if(isset($resEdit['name']) && $resEdit['name']!=''){ echo $resEdit['name'];} ?>" />
                                                </div>
                                            </div>
                                            
                                        </div>                                        
                                      	<div class="form-group">
                                            <div class="offset-md-3 col-md-9">
                                            	<?php if($isEdit){ ?>
                                            		<button type="submit" name="update" class="btn btn-info">Update</button>
                                            	<?php } else { ?>
                                            		<button type="submit" name="add" class="btn btn-info">Submit</button>
                                            	<?php } ?>                                                                                                
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
