<form method="post" enctype="multipart/form-data">
	<div class="row">
		<div class="col-sm-6 col-md-6">
			<div class="form-group">
				<label>Name of Course :</label>
				<select name="course" class="form-control custom-select2" id="course">
                  <option value="">Select Name of Course</option>  
                  <?php
                      $course=mysqli_query($connect,"select * from tbl_course where fld_course_delete='0' order by fld_course_id desc") or die(mysqli_error($connect));
                      while ($fetch=mysqli_fetch_array($course)) {
                      	extract($fetch);

                        if (isset($_POST['submit']))
                         { ?>
                         <option value="<?php echo $fetch['fld_course_id'];?>" <?php if ($fetch['fld_course_id']==$_POST['course']){echo "selected";} ?>><?php echo $fetch['fld_course_name'];?></option>
                       <?php } 
                       else {
                    ?>
                    <option value="<?php echo $fetch['fld_course_id']; ?>"><?php echo $fetch['fld_course_name']; ?></option>
                  <?php } }?>               
                </select>
			</div>
		</div>
		<div class="col-sm-6 col-md-6">
			<div class="form-group">
				<label>Invoice Date :</label>
				<?php if(isset($_POST['submit']))
				{ ?>
					<input class="form-control datetimepicker-range" placeholder="Select Date" type="text" name="date_range" value="<?php echo $_POST['date_range'];?>" >

				<?php } else{ ?>	
					<input class="form-control datetimepicker-range" placeholder="Select Date" type="text" name="date_range" >
				<?php } ?>
			</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>

