How Edit record using Codeigniter
You have disabled="disable"
in your input
for id
. This means it won't be included in the form POST
. You need to remove disabled="disable"
.
Try that:
<label> ID </label><input type="text" name="id" id="id" value="<?php echo $record->id ;?>" />
For proper practices you should set the input type to hidden
instead or put the ID in the url (depends on your application).
<input type="hidden" name="id" id="id" value="<?php echo $record->id ;?>" />