Welcome Guest, Not a member yet? Register   Sign In
flashdata problem
#1

[eluser]HooJee[/eluser]
Hi Guys

Im having problems with flashdata. I have a form, if the user submits the form without filling in one or two fields, the fields that do contain data are inserted into flash_data and outputed in the view. The problem is the user will need to press the submit button twice because his entered data shows. Does anyone know where Im going wrong ?

controller:
Code:
$this->session->set_flashdata('title', $title);

view:
Code:
echo $this->session->flashdata('title');
#2

[eluser]Dam1an[/eluser]
Why not just use the form validartion library? It will let you easily repopulate fields if not all have been filled it, look at the set_value function
#3

[eluser]Ivan A. Zenteno[/eluser]
Yea You need use the form validation library, and this lib helpe you to repopulate fields on the form, and yes check the set_value function like say Dam1an




Theme © iAndrew 2016 - Forum software by © MyBB