Re: php and javascript question
| From: | Miguel Cruz | Date: | Thu, 06 Jun 2002 01:25:33 +0000 |
| Subject: | Re: php and javascript question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100841@lists.php.net to get a copy of this message | ||
On Wed, 5 Jun 2002, Martin Clifford wrote:
> As far as I'm aware you can't create a javascript variable and use it
> within PHP on the same page. You can add that variable's value to a
> hidden form element to be passed to the next page, but I don't think so
> with the same page.
You're quite right; the PHP executes and terminates before the JavaScript
ever starts.
If you want to get JavaScript-calculated values back into PHP, you have to
pass them back through new requests to the server.
miguel