Re: passing parameters from one page to another
| From: | Sait Karalar | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: passing parameters from one page to another | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80192@lists.php.net to get a copy of this message | ||
Hi,
If you want some parameters which will be pass in your site, you can use
session"
.
for example, you have parameters, fooa, foob, fooc, ... etc..
<?
session_start();
$fooa = 1;
$foob = "sait";
$fooc = "http://www.yonlendir.com/";
// you do,
session_register("fooa");
session_register("foob");
session_register("fooc");
?>
then you can use them everywhere in your site as "$fooa", "$foob",
"$fooc".
You can change it's value. you can unset with
session_unregister("fooa");
Be carefull that, your paramater is $fooa, you should register it without $
session_register("fooa"); // No $ at the beginning of the paramater...
And you should put session_start() at the top of the page, if you will use
these parameters in that PHP file...
Also, you can use COOKIES...! I dont prefer in general ... and do NOT
session_register a password or a credit card number, for security reasons...
good works...
-------Original Message-------
From: simos@athenatours.gr
Date: 11 Ocak 2002 Cuma 14:13:41
To: php-general@lists.php.net
Subject: [PHP] passing parameters from one page to another
Hello everybody
I want from a Form page to pass a couple of values (fooa, foob, fooc)
which are not form fields
when submit button pressed to the submited page...
thanks in advance for your help
simos