<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="row" style="border-radius: 0 !important;" >
        <div class="col-sm-6" style=" padding-left:0px;">
            <?php
            foreach($profile as $row){}
            $form = array('data-toggle' => "validator", 'autocomplete' => "off", 'id' => "signupform", 'role' => "form", 'method' => "POST");
            echo form_open_multipart('admin/updateProfile', $form);
            
            ?>

            <br />         
            <div class="row" style="margin-left: 40px !important">
                <?php
                if(!empty($msg)){ ?>
                <div class="alert alert-success"><?php echo $msg; 
                header('refresh: 2; url='.base_url().'admin/profile');
                ?></div>
               <?php  } ?>
                   <div class="panel panel-primary">
                    <div class="panel panel-heading"><strong>Personal Profile</strong></div>
                    <div class="panel panel-body">
                        <div class="col-sm-12">
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <span class="input-group-addon">Title</span>
                                  <select name="title" id="title" class="form-control">
                            <option value="">Select Title/Prefix</option>
                            <option value="Prof."<?php if($row['title']=='Prof'){echo "selected";}?>>Prof.</option>
                            <option value="Dr." <?php if($row['title']=='Dr.'){echo "selected";}?>>Dr.</option>
                            <option value="Mr." <?php if($row['title']=='Mr.'){echo "selected";}?>>Mr.</option>
                            <option value="Mrs." <?php if($row['title']=='Mrs.'){echo "selected";}?>>Mrs.</option>
                            <option value="Miss." <?php if($row['title']=='Miss.'){echo "selected";}?>>Miss.</option>
                            <option value="Engr." <?php if($row['title']=='Engr.'){echo "selected";}?>>Engr.</option>
                        </select>
                        </div>
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <span class="input-group-addon">Surname</span>
                           <input value="<?php echo $row['surname']; ?>"
                               name="surname"
                               id="surname"
                               class="form-control"
                               placeholder="Enter Surname"
                               required>    
                           <input type="hidden" name="id" value="<?php echo $row['id']; ?>" />
                        </div>
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <span class="input-group-addon">Other Names</span>
                           <input value="<?php echo $row['othernames']; ?>"
                               name="othernames"
                               id="othernames"
                               class="form-control"
                               placeholder="Enter Other Names"
                               required>       
                        </div>
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <span class="input-group-addon">Username</span>
                           <input value="<?php echo $row['username']; ?>"
                               name="username"
                               id="surname"
                               class="form-control"
                               placeholder="Enter Username"
                               required>       
                        </div>
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <span class="input-group-addon">Password</span>
                                 <input type="password"
                               name="password"
                               id="surname"
                               class="form-control"
                               
                               required>       
                        </div>
                            <div class="input-group" style="margin-bottom: 10px !important">
                                 <input type="submit" name="submit" class="btn btn-primary" value="Update Profile" />       
                        </div>
                            <?php echo form_close(); ?>
                        </div>
                       
                    </div>
                </div>
                
                
            </div>
            </div>
                
            </div>
            
            
                
               


            
            

            
            
                          
        </div>

    </div>
</div>
<script  type="text/javascript">
    var frmvalidator = new Validator("signupform");
    frmvalidator.addValidation("title", "req", "Select Title");
    frmvalidator.addValidation("surname", "req", "Enter Surname");
    frmvalidator.addValidation("firstname", "req", "Enter First Name");
    frmvalidator.addValidation("sex", "req", "Select Sex");
    frmvalidator.addValidation("nat", "req", "Select Nationality");
    frmvalidator.addValidation("dob", "req", "Date of Birth");
    frmvalidator.addValidation("place", "req", "Select Place");
    frmvalidator.addValidation("home", "req", "Enter Home Address");
    frmvalidator.addValidation("email", "req", "Enter Email");
    frmvalidator.addValidation("email", "email", "Invalid Email");
    frmvalidator.addValidation("phone", "req", "Enter Phone");
    frmvalidator.addValidation("phone", "numeric", "Invalid Phone");
    frmvalidator.addValidation("identity", "req", "Select Identity Type");
    frmvalidator.addValidation("identityNo", "req", "Enter Identity No");
    frmvalidator.addValidation("idIssue", "req", "Select Date of Issue");
    frmvalidator.addValidation("idExpiry", "req", "Select Date of Expiry");
    frmvalidator.addValidation("employment", "req", "Select Employment Status");
    frmvalidator.addValidation("employer", "req", "Enter Employer Name");
    frmvalidator.addValidation("employerPhone", "req", "Enter Employer Phone");
    frmvalidator.addValidation("employerPhone", "numeric", "Invalid Employer Phone");
    frmvalidator.addValidation("employerEmail", "req", "Enter Employer Email ");
    frmvalidator.addValidation("employerEmail", "email", "Enter Valid Employer Email");
    frmvalidator.addValidation("nok", "req", "Enter Next of Kin");
    frmvalidator.addValidation("nokAddress", "req", "Enter Next of Kin Address");
    frmvalidator.addValidation("nokPhone", "req", "Enter NoK Phone");
    frmvalidator.addValidation("nokPhone", "numeric", "Enter valid NoK Phone");
    frmvalidator.addValidation("dependent", "req", "Enter No of Dependent");
    frmvalidator.addValidation("dependent", "numeric", "Ivalid Dependent Number");
    
    
    
    </script>
