
August 6th, 2001, 09:35 PM
|
|
UberGeek
|
|
Join Date: Apr 2001
Posts: 67
Time spent in forums: 4 h 50 m 48 sec
Reputation Power: 13
|
|
Setting PHP variables with Javascript?
Is there a way to set a PHP variable with javascript? I'd like to do something like this:
<SCRIPT LANGUAGE='Javascript'>
<!--
function set_fruit( fruit )
{
$this_fruit = fruit;
return true;
}
//-->
</SCRIPT>
<A HREF="www.foo.com" onClick='set_fruit( "Apple" );'>
Apple</A>
where $this_fruit is a PHP session variable.
|