<form method="post" enctype="multipart/form-data">
	<div class="row">
		<div class="col-sm-6 col-md-6">
			<div class="form-group">
				<label>Employee Name :</label>
         <?php if(isset($_POST['submit'])){ ?>
				<input type="text" name="emp_name" class="form-control" placeholder="Enter Employee Name" value="<?php echo $_POST['emp_name']?>" oninput="this.value = this.value.replace(/[^a-zA-Z\s.]/g, '').replace(/(\..*)\./g, '$1');">
        <?php } else { ?>
          <input type="text" name="emp_name" class="form-control" placeholder="Enter Employee Name" oninput="this.value = this.value.replace(/[^a-zA-Z\s.]/g, '').replace(/(\..*)\./g, '$1');">
      <?php } ?>
			</div>
		</div>
		<div class="col-sm-6 col-md-6">
			<div class="form-group">
				<label>Employee ID :</label>
				<select name="emp_id" class="form-control custom-select2" id="emp_id" >
                  <option value="">Select Employee Id</option>  
                   	<?php
                      $emp=mysqli_query($connect,"select * from tbl_empolyee_details where fld_emp_details_delete='0' order by fld_emp_details_id desc") or die(mysqli_error($connect));
                      while ($fetch=mysqli_fetch_array($emp)) {
                         extract($fetch);

                        if (isset($_POST['submit']))
                         { ?>
                         <option value="<?php echo $fetch['fld_employee_id'];?>" <?php if ($fetch['fld_employee_id']==$_POST['emp_id']){echo "selected";} ?>><?php echo $fetch['fld_employee_id'];?></option>
                       <?php } 
                       else { ?> 
                    ?>
                    <option value="<?php echo $fetch['fld_employee_id']; ?>"><?php echo $fetch['fld_employee_id']; ?></option>
                  <?php } }?>      
                </select>
			</div>
		</div>
	</div>

	
    <div class="form-group row">				            
        <div class="col-sm-12 col-md-12">			              	
      		<center>
      			<input class="btn btn-success" value="Submit" type="submit" name="submit">
        		<input class="btn btn-danger" value="Reset" type="reset">
        	</center>
      	</div>
    </div>

</form>

