<?php
$first_name = ($this->input->post('first_name')) ?: $this->session->userdata('logged_in')['first_name'];
$last_name = ($this->input->post('last_name')) ?: $this->session->userdata('logged_in')['last_name'];
?>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">Edit Profile</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-5">
<?php echo validation_errors(); ?>
<?php echo form_open('profile/edit'); ?>
<div class="form-group">
<label for="first_name">First Name:</label>
<input type="text" class="form-control" id="first_name" name="first_name" value="<?php echo set_value('first_name', $first_name); ?>" />
</div>
<div class="form-group">
<label for="last_name">Last Name:</label>
<input type="text" class="form-control" id="last_name" name="last_name" value="<?php echo set_value('last_name', $last_name); ?>" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Edit Profile" />
</div>
</form>
</div>
</div>
</div>
<div class="panel-footer text-right">Page rendered in <strong>{elapsed_time}</strong> seconds!</div></div>
</div>
</div>