Re: insert into javascript php
| From: | Adam Royle | Date: | Fri, 22 Mar 2002 13:23:12 +0000 |
| Subject: | Re: insert into javascript php | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17834@lists.php.net to get a copy of this message | ||
PHP cannot recognise javascript variables because javascript is interpreted via the browser, and not the server (which php is). for php to use javascript variables, you must post the variable to another page using either a form or querystring.
Adam
<script> c=document.forms[0].category.options[document.forms[0].category.selectedIndex] .text <?php $x=c; ?> </script> but the php doesn't understand this c variable