<form id="save_biodata" method="POST">
										  <div class="form-group col-md-6">
											<label for="email">First Name:</label>
											<input type="text" name="f_name" class="form-control" value="<?php
											if(!empty($first_name)){
												echo $first_name;
											}
											?>"  readonly  >
										  </div>
										  <div class="form-group col-md-6">
											<label for="pwd">Other Name:</label>
											<input type="text" name="m_name" class="form-control"  value="<?php
											if(!empty($middle_name)){
												echo $middle_name;
											}
											?>"  readonly>
										  </div>

										  <div class="form-group col-md-4">
											<label for="email">Marital Status:</label>
											<select class="form-control" name="marital" required readonly>
												<?=select_marital_status($marital_status);?>
											</select>
										  </div>
										  <div class="form-group col-md-4">
											<label for="pwd">Gender:</label>
											<select class="form-control" name="gender" required readonly>
												<?php echo select_gender($gender);?>
											</select>
										  </div>
										  <div class="form-group col-md-4">
											<label for="pwd">Religion:</label>
											<select class="form-control" name="religion" required readonly>
											<?php echo select_religion($religion);?>
											</select>
										  </div>
										  <div class="form-group col-md-3">
											<label for="pwd">Place of Birth:</label>
											<input type="text" name="pob" value="<?php
											if(!empty($place_of_birth)){
												echo $place_of_birth;
											}
											?>" class="form-control" required readonly>
										  </div>
										  <div class="col-md-3">
												<div class="form-group">
													<label for="day">Day <span class="ast">*</span></label>
												<select name="day" class="form-control" readonly>
													<option value="0"  > --DD-- </option>
												<?php if(!isset($day)){echo day(get_user_day($user_id));}else{ echo day($day);} ?>
													</select>
												</div>
											</div>

											<div class="col-md-3">
												<div class="form-group">
													<label for="month">Month <span class="ast">*</span></label>
														<select name="month" class="form-control" readonly>
															<option value="0"> --MM-- </option>
															<?php  if(!isset($month)){echo month(get_user_month($user_id));}else{ echo month($month);}  ?>
														</select>
												</div>
											</div>

											<div class="col-md-3">
												<div class="form-group">
													<label for="year">Year <span class="ast">*</span></label>

													<select name="year" class="form-control" readonly>
													<option value="0"  > --YYYY-- </option>
													<?php if(isset($year)){echo year($year);}else{echo  year(get_user_year($user_id)); } ?>
													</select>
												</div>
											</div>
										  <label style="color:red; font-weight:bold;font-size:16px;">Nationality</label>

										  <hr/>
										  <div class="form-group col-md-4">
											<label for="pwd">Country:</label>
											<select class="form-control" name="country" required readonly>
												<?=select_nationality($nationality);?>
											</select>
										  </div>
										  <div class="form-group col-md-4">
											<label for="pwd">State:</label>
											<select class="form-control" name="state" id="state_id" onchange="load_lga()" required readonly>
												<option value="0">-- Choose State</option>
												<?=select_state($state_id);?>
												</select>
										  </div>
										  <div class="form-group col-md-4">
											<label for="pwd">LGA:</label>
											<select class="form-control" name="lga" id="lga" required readonly>
												 <?=select_lga($state_id,$lga_id);?>


											</select>
										  </div>
										  <div id="saving">
										  <center><button type="submit" onclick="add()" disabled  class="btn btn-login btn-green"><span>Save</span></button>
										  </center>
										  </div>

										  <div id="output">

										  </div>

</form>

<script type="text/javascript">
$(document).ready(function(e){



		$("#save_biodata").submit(function(event){
			event.preventDefault(); //prevent default action
			var post_url = "includes/php/update_biodata"; //get form action url
			var request_method = $(this).attr("method"); //get form GET/POST method

			$("#output").html('<div style="margin-top:10px"><center>Saving Data, please wait...<br/><img src="images/ajax-loader1.gif" width="10%"/></center></div>');
			document.getElementById("saving").style.display = "none";
			var form_data = new FormData(this); //Creates new FormData object


				$.ajax({
					url : post_url,
					type: request_method,
					data : form_data,
					contentType: false,
					cache: false,
					processData:false
				}).done(function(response){ //

					if(response==1){


					 document.getElementById("saving").style.display = "block";
					 $("#output").html("");
					  //swal("");
						swal("Bio-Data Updated!", "You clicked the button!", "success");


					}else{

					$("#output").html(response);
					document.getElementById("saving").style.display = "block";

					}
				});

		});
});

function load_lga(){




			var state_id = document.getElementById("state_id").value;

			//swal(lga);

			$.post('includes/php/load_lga.php',{state_id:state_id},
			function(response,status){

			document.getElementById("lga").innerHTML =response;

			});
}
</script>
