Welcome Guest, Not a member yet? Register   Sign In
Redirecting with $_POST
#1

(This post was last modified: 03-09-2021, 12:28 AM by motownphilippe.)

I would like to pass $_POST data on successful completion of a form. 

This will place my form data into $_SESSION as an array 

PHP Code:
redirect()->route('education')->with('report''Session Saved')->withInput(); 

I can get to this via 
PHP Code:
session('_ci_old_input')['post'

but not the individual values, for a reason I don't understand. 
It feels as though there must be a more elegant way to access '_ci_old_input' but I'm not sure what it is. 



How can I pass $_POST data on to a new page with redirect() ? 

Happy to try a different strategy. Flash Session data?
Reply
#2

How silly of me, I can just use
PHP Code:
set_value('var-name'

for some reason I thought I can only use set_value() in a view. Works fine in my controllers and classes.
Case closed.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB