|
Posted by Rik on 10/24/06 04:10
kirke wrote:
> Thx Rik.
>
> B, C, D are different pages. Then How can I set it?
> Hidden doesn't work at all.
Hidden should work, with added security risk of users changing the value in
between.
If the data is not vital/not a potential risk, you can set it by adding a
hidden value to the form, named whatever you like, and make sure the only
way the user comes to C (or D) is by the same form that holds that hidden
input.
If that doesn't work for you, you either have a flaw in your PHP or your
HTML. print_r($_POST) to see what you received on the request.
Also a possibility (that I wouldn't recommend, but it's possible) is to set
a GET value in the action of the form.
On bigger/more secure scripts, usually sessions are used.
Add session_start() to your script (BEFORE any output, even a space will
make it impossible to use), and then assign your value like
$_SESSION['name_of_variable'] = $var;
On a succesfull session_start() on the other pages, the value will now be
available.
--
Grtz,
Rik Wasmus
Navigation:
[Reply to this message]
|