Welcome Guest, Not a member yet? Register   Sign In
session data loss in codeigniter
#1

So here is the problem i am facing. i have 3 views 1 controller . data has to pass from first view to second and then in third after which i insert it into database.. i fill the data in first form(view) post it. controller checks if i have logged in n stores data into a session or if its a click on back button on 2nd view then it should fetch data from session which is set (example $this->session->set_userdata('formarr', $formarr); i.e post from first form).
Now i fill data in 2nd form (view), post it. controller checks if i have logged in n stores data into a session or if its a click on back button on 3rd view then it should fetch data from session which is set in another 2nd array (example $this->session->set_userdata('vehicle_details', $veharr);i.e post from second form).
both these variables are now taken and 3rd view is loaded lets say confirmation view.which wen submitted it inserts into database.
now my problem arises when i click on back button its an href (eg :/home/newvehicle/confirm ) it shows both arrays in session .. but wen i submit.. i loose first array(formarr turns with keys but no values).. i guess its due to no posting of data.. but i dont know what would be a solution for the same.
Please if anyone can guide me it would make my day.
Reply


Messages In This Thread
session data loss in codeigniter - by neenz - 01-03-2016, 05:06 AM
RE: session data loss in codeigniter - by neenz - 01-04-2016, 11:38 PM
RE: session data loss in codeigniter - by PaulD - 01-05-2016, 05:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB