Reputation: 308
I am submitting the form in codeigniter. In my input type text in want the value remain when error is occurred.
<input type="text" name="lastname" id="lnm" >
I tried using $_get['lastname']
which do in php. but it is not working.
Upvotes: 2
Views: 89
Reputation: 4007
Use set_value()
it will solve your problem
<input type="text" name="lastname" id="lnm" value="<?php echo set_value('lastname', '0'); ?>" >
Upvotes: 2