Pass value to 2 pages

Links for php scripts

Moderators: macek, egami, gesf

kiwi
New php-forum User
New php-forum User
Posts: 124
Joined: Sun Feb 29, 2004 6:26 am
Contact:

Pass value to 2 pages

Postby kiwi » Fri Sep 24, 2004 1:12 pm

when we use form, we have to pass value to the page that is set by the form, it mean only one page only can get the value, now i want to pass the same value to 2 page, but how? if i use session_register, i'll have problem. any way to use form to pass value to 2 pages? thanks

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Fri Sep 24, 2004 1:34 pm

Using sessions is the best way for doing that!
What problems you have when using sessions !?
Do you have some code to show !?

Cheers

User avatar
ndtoan13
New php-forum User
New php-forum User
Posts: 23
Joined: Thu Sep 30, 2004 5:49 pm
Contact:

Postby ndtoan13 » Sun Oct 03, 2004 11:49 pm

use : $_POST[variable_name] to get value from page to page.
(where variable_name is name of form/text box..)

Note: only work with PHP 4.34 or higher. If you use old version of PHP, you can use $HTTP_POST_VARS[variable_name]

sadisticmachine
New php-forum User
New php-forum User
Posts: 109
Joined: Tue Nov 02, 2004 5:33 am

cookie

Postby sadisticmachine » Wed Nov 03, 2004 6:47 am

try simply using setcookie(). Make sure that you read the variables from the $_COOKIE array if auto globals is on though, otherwise you might create a security loophole.


Return to “PHP Scripts”

Who is online

Users browsing this forum: Google [Bot] and 1 guest