<?php $this->load->view('header_sub'); ?>
<?php //$this->load->view('security'); ?>
<div  class="box" style="margin-bottom:0px;">
					<div class="box-head">
						<h2>Edit User</h2>
					</div>
					<form action="<?php base_url();?>update_user" method="post" name="userform" onSubmit="return add_user()">
						<div class="form" id="signup">
                 <table width="550">
<?php 
foreach($query as $val)
{

?>

<tr>
  <td width="100" height="37"><strong>Name*</strong></td>
  <td width="204"><label for="ref_number"></label>
    <input type="text" name="name" value="<?php echo $val->name; ?>" class="field" id="name" ></td>
  <td width="230">Enter Your Name</td>
</tr>
<tr>
  <td height="35"><strong>Father Name*</strong></td>
  <td><input type="text" name="father_name" value="<?php echo $val->father_name; ?>" class="field" id="father_name"></td>
  <td>Enter Father Name</td>
</tr>
<tr>
  <td height="41"><strong>Group*</strong></td>
  <td>
  <select class="field"  id="group_id" name="group_id" style="width:84%">
      <?php 
             $qry_state=mysql_query("select * from kp_group");
             while($row_state=mysql_fetch_array($qry_state)){
        ?>
      <option value="<?php echo $row_state['group_id'];?>" <?php if($val->group_id==$row_state['group_id']){ ?> selected="selected" <?php }?>><?php echo $row_state['group_name'];?></option>
      <?php }?>
    </select></td>
  <td>Select Group</td>
</tr>
<tr>
  <td height="40"><strong>CNIC*</strong></td>
  <td><input type="text" name="nic" value="<?php echo $val->nic; ?>" id="nic" class="field"></td>
  <td>CNIC Format (12102-5788383-5)</td>
</tr>
<tr>
  <td height="38"><strong>Email*</strong></td>
  <td><input type="text" name="email" value="<?php echo $val->email; ?>" id="email" class="field"></td>
  <td>Enter Email Address</td>
</tr>
<tr>
  <td height="38"><strong>Password*</strong></td>
  <td><input type="password" name="password"  value="<?php echo $val->password; ?>" id="password" class="field"></td>
  <td>Enter Password</td>
</tr>

<tr>
  <td>&nbsp;</td>
  <input type="hidden" value="<?php echo $val->user_id; ?>" name="user_id" >
  <td><input type="submit" name="submit_user_form" class="button" id="submit_user_form" value="Submit"></td>
  <td>&nbsp;</td>
</tr>

<?php
}
?>
</table>			
</div>
</form>
</div>
	