<?php
session_start();
include "connect.php";



		$id = intval($_REQUEST['id']);
		
		 $eve1 = "SELECT * FROM res_studentinquiry_detail WHERE stiqmid= '$id'";
	  $re1 = mysqli_query($conn, $eve1);
	
    //Count total number of rows
     if(mysqli_num_rows($re1) > 0)
	{
		
        while($rt1= mysqli_fetch_assoc($re1))
		{ 
			$siprefferedcountry=$rt1['siprefferedcountry'];
		}  
	}
		

?>

						<!--begin::Input group-->
							<input type="hidden" name="stiqmid" value="<?php echo $id; ?>" id="stiqmid">
																
																<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2">Select Document Type:</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	
													<select class="form-select form-select-solid" data-control="select2"  name="idmid" id="idmid">
													  <option value="0">Select
													  </option>
													  <?php		
							$eve="SELECT * FROM res_countrydocument_detail WHERE countrymid= ".$siprefferedcountry;
	
    $re = mysqli_query($conn, $eve);
	//echo '<option value="'.$eve.'">'.$eve.'</option>';
    //Count total number of rows
    if(mysqli_num_rows($re) > 0)
	{
		while($rt= mysqli_fetch_assoc($re))
		{ 
			$documentmid=$rt['documentmid'];
		 
		  $eve2 = "SELECT * FROM res_inquirydocs_master WHERE idmid= '$documentmid'";
	  $re2 = mysqli_query($conn, $eve2);
if(mysqli_num_rows($re2) > 0)
	{
		
        while($rt2= mysqli_fetch_assoc($re2))
		{ 
			$idmname=$rt2['idmname'];
		}  
	} 
		
       
            echo '<option value="'.$documentmid.'">'.$idmname.'</option>';
			
        }
    }else{
        echo '<option value="0">No Data Found</option>'; 
    }
		  
							?>	
                        </select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2"> Upload Document</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<input type="file" name="file11" class="form-control" required>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->	
																<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-1 rol-cols-md-1 row-cols-lg-1">
													<!--begin::Col-->
													<div class="col-md-12 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2">Remark</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																		<input type="text" name="idremark" class="form-control form-control-solid" >
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													
														</div>
												<!--end::Row-->			<!--end::Scroll-->
																
