RE: [PHP] passing values from one script to another script
| From: | John W. Holmes | Date: | Sun, 16 Mar 2003 22:43:45 +0000 |
| Subject: | RE: [PHP] passing values from one script to another script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139878@lists.php.net to get a copy of this message | ||
> I want to pass a value, which came from a HTML form, to another PHP
> script. How can i do this?
>
> e.g.: $login - the value of this varriable is came from LOGIN.HTML to
> LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to
> PROCESS.PHP?
The easiest way is with a session. Remember, each request is unique, so
if you want to carry something over, you have to include it in the next
request. This means adding it to the URL ($_GET) or adding it to a form
($_POST), adding it to a cookie ($_COOKIE), or putting it in the session
($_SESSION).
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/