Posted by Kurrent on 07/05/07 03:17
I have some data from text fields that are being passed over through a
form that I am displaying with the $_POST superglobal. Once i have
echo'd out this data onto the next page, i'd like to continue to use
it on the next page. I haven't figured out how to do this properly
just yet, but I'm guessing it has something to do with sessions. I
have MANY variables being passed (over 100) and I'm hoping i don't
have to register each one of these manually with $_SESSION[].
example.
//first page (index.html)
<form action="form.php" method="post">
<select name="color"><option value="blue">blue</option><option
value="red">red</option>
<input name="submit" type="submit">
//new page (form.php)
<?php
echo "Bill's favorite color is {$_POST['color']}";
?>
////
Now say I want to use this $_POST['color'] value on another page that
the form.php takes you to next.....how do i continue to use this value
across multiple pages?
I'm assuming this is a trivial question, but i can't seem to figure it
out! Any help is much appreciated..thanks guys!
[Back to original message]
|