Reputation: 99
Here is an explanation of my question.
I have 2 forms: add & add1
2 pages: add.php & add1.php
and 2 functions: function post_add & function post_add1 when the user has fill and submit the form add, function post_add automatically redirect to user to add1.
I want to pass value (after the user fill it and submit it) from form add
"echo Form::text('name', Input::get('name'));"
to form add1, because you need to type the same thing on next form.
Thanks in advance!
Upvotes: 0
Views: 4507
Reputation: 11749
Just use Session::flash();
Like so...
function post_add(){
//blah blah your code.
$passvalues = Input::all();
Session::flash('values', $passvalues);
Redirect::to('/add1');
}
function post_add1(){
//Now you have access to that input...
$oldinput = Session::get('values');
//do whatever you need to with the old/passed input
}
Or you could just do a with()....
function post_add(){
//blah blah your code.
$passvalues = Input::all();
Redirect::to('/add1')->with('values', $passvalues);
}
Upvotes: 1