


 <div class="row">
  
  
  
  </div>
   	<div class="col-md-12">
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Please Enter Correct   Personal Details
            	</div>
            </div>
			<div class="panel-body">

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
					
	
				<?PHP
$session_data = $this->session->userdata('logged_in');
$data['username'] = $session_data['username'];
$data['id'] = $session_data['id'];

$username=$data['username'];
$id=$data['id'];

	$data['firstname'] = $session_data['firstname'];
 			$data['surname'] = $session_data['surname'];
 				$surname=$data['surname'];
					$firstname=$data['firstname'];
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('addstudentbio' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
					
					

					
	
		<div class="form-group">
    <label for="inputsurname" class="col-sm-2 control-label">	Surname</label>
    <div class="col-sm-10">
		
	
				<input type="text" readonly name="surname" value="<?php echo set_value('surname',$bio[0]['surname']) ;?>" id="surname" class="form-control" required placeholder="Enter Surname">
		  		
				
		<span class="text-danger"> Enter your surName here..<?php echo form_error('surname'); ?>
		
		</span>
	</div>
  </div>
	<div class="form-group">
    <label for="inputfirstname" class="col-sm-2 control-label">	First Name</label>
    <div class="col-sm-10">
		    <input id="id"  name="id"   placeholder="Enter id" type="hidden"  class="form-control"  value="<?php echo set_value('id',$id); ?>" />

	
    <input id="firstname" name="firstname"   readonly placeholder="Enter Your First Name" type="text"  class="form-control"  value="<?php echo set_value('firstname',$bio[0]['firstname']); ?>" />
		  		
				
		<span class="text-danger"> Enter (First and Second Names) here...<?php echo form_error('firstname'); ?>
		
		</span>
	</div>
  </div>	



	
  <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">	Id Number</label>
    <div class="col-sm-10">
		
				<input type="text" name="idno" onkeypress="return numbersonly(event)" value="<?php echo set_value('idno', $bio[0]['idno']); ?>" id="pfnumber" class="form-control" required placeholder="Enter National id No">
		
		<span class="text-danger"> Enter your Id Number<?php echo form_error('idno'); ?>
		
		</span>
	</div>
  </div>
    <input type="hidden" name="category" value="student"   id="category" class="form-field"  placeholder=" Enter category">

	<div class="form-group">
    <label for="inputbox" class="col-sm-2 control-label">	P.O Box </label>
    <div class="col-sm-10">
		
		  		<input type="text" name="box" value="<?php echo set_value('box',$bio[0]['box']); ?>"id="box" class="form-control" required placeholder="P.o Box " >

		  		
				
		<span class="text-danger"> Enter your  Box Number<?php echo form_error('box'); ?>
		
		</span>
	</div>
  </div>	

  	<div class="form-group">
    <label for="inputtown" class="col-sm-2 control-label">Town</label>
    <div class="col-sm-10">
		
	
		
				<input type="text" name="town" value="<?php echo set_value('town',$bio[0]['town']) ;?>" id="town" class="form-control" required placeholder="Enter Town Name">
		
		  		
				
		<span class="text-danger"> 	Enter  your nearest town  here..<?php echo form_error('town'); ?>
		
		</span>
	</div>
  </div>	

  	<div class="form-group">
    <label for="inputcode" class="col-sm-2 control-label">	Town code</label>
    <div class="col-sm-10">
		
		
		<input type="text" name="code"  value="<?php echo set_value('code',$bio[0]['code']) ;?>"  id="code" class="form-control" required placeholder="Enter Code">
				
				
		<span class="text-danger"> 	Enter your  town code here..<?php echo form_error('code'); ?>
		
		</span>
	</div>
  </div>	

  	<div class="form-group">
    <label for="inputphone" class="col-sm-2 control-label">	Phone No</label>
    <div class="col-sm-10">
		

					<input type="text"  name="phone" value="<?php echo set_value('phone',$bio[0]['phone']); ?>" id="phone" class="form-control" required placeholder="Phone / Mobile No">

		  		
				
		<span class="text-danger"> Enter  your  Phone No  here..<?php echo form_error('phone'); ?>
		
		</span>
	</div>
  </div>	

  	<div class="form-group">
    <label for="inputemail" class="col-sm-2 control-label">	 Email</label>
    <div class="col-sm-10">
		
	
	<input type="email"   name="email" value="<?php echo set_value('email',$bio[0]['email']) ;?>" id="email" class="form-control" required placeholder="Enter Email Address">
		  		
				
		<span class="text-danger"> 	Enter your Personal Email here..<?php echo form_error('email'); ?>
		
		</span>
	</div>
  </div>	


  
  
    <div class="form-group">
    <label for="inputothername" class="col-sm-2 control-label">	Country</label>
    <div class="col-sm-10">
		
<select name="country" id="country"class="form-control" required>
    <?php
 $countryid= $bio[0]['country'];
$country = $this->nationmodel->getcountrybyid($countryid);


if(is_array($country)) {

   foreach($country as $countryrow){

    ?>
	    <option value="<?php echo set_value('country',$countryrow->id); ?> "><?=$countryrow->name;?></option>

   
    <?php

}} else {
 ?>
<option value="0"  >---Select your country---</option>

		<?php 
}
	
$nation = $this->nationmodel->populatenation();


if(is_array($nation)) {

   foreach($nation as $nationrow){

    ?>
	    <option value="<?php echo set_value('country',$nationrow->id); ?> "><?=$nationrow->name;?></option>

   
    <?php

}} else {
    echo 'There is no any country data available.... try again.';
}

?>
	</select>
		
		
		<span class="text-danger"> <?php echo form_error('country'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
  
  
  <div class="form-group">
    <label for="inputdob" class="col-sm-2 control-label"> 	Date of Birth </label>
    <div class="col-sm-10">
		
				<input type="date" name="dob" value="<?php echo set_value('dob', $bio[0]['dob']) ;?>" id="dob" class="form-control" required placeholder="Enter date of permanent">
	
		<span class="text-danger"> Enter Your Date of Birth here..<?php echo form_error('dob'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  

	
  
  
  
  
  
  
  
  
  
  
  
  
  

  	<div class="form-group">
    <label for="inputgender" class="col-sm-2 control-label">Gender</label>
    <div class="col-sm-10">
		
	
		
			<select required class="form-control" name="gender">
		   <option selected="selected" value="<?=   $bio[0]['gender']  ?>"><?=   $bio[0]['gender']  ?></option>
				<option value="Male">Male</option>
				<option value="Female" > Female </option>
				
				</select>		
		  		
				
		<span class="text-danger"> 	<?php echo form_error('gender'); ?>
		
		</span>
	</div>
  </div>	
  
 
  	

  


  
 



 	<div class="form-group" id="province1">
    <label for="inputprovince" class="col-sm-2 control-label">	Province</label>
    <div class="col-sm-10">

		<select name="province" class="form-control" required>



   <?php
 $myprovinceid= $bio[0]['province'];
$myprovince = $this->provincemodel->getprovincebyid($myprovinceid);


if(is_array($myprovince)) {

   foreach($myprovince as $myprovincerow){

    ?>
	    <option value="<?php echo set_value('province',$myprovincerow->id); ?> "><?=$myprovincerow->name;?></option>

   
    <?php

}} else {
 ?>
<option value="0"  >---Select your Province---</option>

		<?php 
}
	








$province = $this->provincemodel->populateprovince();


if(is_array($province)) {

   foreach($province as $province){

    ?>
	    <option value="<?php echo set_value('province',$province->id); ?> "><?=$province->name;?></option>

   
    <?php

}} else {
    echo 'There is no any district data available.... try again.';
}

?>	

</select>	<span class="text-danger"> 	Enter your Province Name (Birth place) here..<?php echo form_error('province'); ?>
		
		</span>
	</div>
  </div>

  <div class="form-group" id="county2">
    <label for="inputcounty" class="col-sm-2 control-label">	County</label>
    <div class="col-sm-10">
<select name="county" id="county"class="form-control" required>

	
<?php
 $mycountyid= $bio[0]['county'];
$mycounty = $this->countymodel->getcountybyid($mycountyid);


if(is_array($mycounty)) {

   foreach($mycounty as $mycountyrow){

    ?>
	    <option  value="<?php echo set_value('county',$mycountyrow->code); ?> "><?=$mycountyrow->name;?></option>

   
    <?php

}} else {
 ?>
<option value="0"  >---Select your County---</option>

		<?php 
}
	

$county = $this->countymodel->populatecounty();


if(is_array($county)) {

   foreach($county as $countyrow){

    ?>
	    <option value="<?php echo set_value('county',$countyrow->code); ?> "><?=$countyrow->name;?></option>

   
    <?php

}} else {
    echo 'There is no any county data available.... try again.';
}

?>
	</select>		<span class="text-danger"> 	Select your county Name (Birth place) here..<?php echo form_error('county'); ?>
		
		</span>
	</div>
  </div>

	
	
	
  	
  	


 

  
  	

	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit" value="registerbio" name="btn_savebio"  class="btn btn-success"> Save / Update data     </button>

    </div>
  </div>
  
  
  
  
  
  
  
  
  
  
  
  
  
									   
									<?php echo form_close();?>
								
							</div>
						</div>
				

					
			
			</div>
		</div>
  
  
  
		
  
  	</DIV>
		</div>
  
  
 
  
  
  
  
  

  


  </div>























