Re: How to set PHP var to Javascript var?
| From: | Matthew Leverton | Date: | Thu, 13 Jul 2000 15:49:01 +0000 |
| Subject: | Re: How to set PHP var to Javascript var? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6466@lists.php.net to get a copy of this message | ||
You cannot directly, you must pas the variable via POST or GET.
<script language="javascript">
var x;
x = 15;
</script>
<input type="button" name="go"
onclick="location.href='test.php?x='+x" />
--
When the button is clicked, the page "test.php" is loaded, and $x is now
equal to the JavaScript x.
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Jason Bryner <jason@focusdesigngroup.com>
To: PHP General <php-general@lists.php.net>
Date: Thursday, July 13, 2000 10:45 AM
Subject: [PHP] How to set PHP var to Javascript var?
>How do I set a PHP variable to equal a Javascript variable?
>
>Jason Bryner
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>