I am using the same view in CodeIgniter
to save and edit. Successfully completed the saving functionality, when using the same form to edit the user. I am getting the error
Message: Undefined variable lastname
<form>
<input type="text" class="form-control" id="lastname" name="lastname" placeholder="Last name" value="<?php echo $user->lastname; ?>">
</form>