Re: pass. vars. betn. javascript and php
| From: | Kevin Stone | Date: | Mon, 06 May 2002 18:10:06 +0000 |
| Subject: | Re: pass. vars. betn. javascript and php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96295@lists.php.net to get a copy of this message | ||
Unless you're doing HTML as a halfway between Javascript and PHP, you cannot
do a POST method (obviously). But you can always pass values in the URL
string.
Access the URL string in Javascript with "document.location.search". Access
the URL string in PHP with "$HTTP_GET_VARS" or "$_GET". You can generate a
URL with variables then do a Header redirect to automate the switch. Use
"document.location.href" in Javascript and "header('Location:') in
PHP".
Read up on these methods and you should be all set.
-Kevin
----- Original Message -----
From: "Pushkar Pradhan" <pushkar@ERC.MsState.Edu>
To: <php-general@lists.php.net>
Sent: Monday, May 06, 2002 11:01 AM
Subject: [PHP] pass. vars. betn. javascript and php
> Is it possible to pass variables from a php page to a page using
> javascript, and vice versa,
> I've the variable - an array passed in the url of the page.
>
> -Pushkar S. Pradhan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>