[thelist] getting a JS variable into PHP

Daniel Frey danieljohnfrey at yahoo.com
Sat Dec 14 15:51:01 CST 2002


Tom,

I think you might have a problem simply based on the nature of PHP and
the nature of Javascript - any PHP functions you may run are already
done server-side before your client-side Javascript even begins.

Dan
-----
http://danfrey.com


-----Original Message-----
heyo,

I need to get a JavaScript variable value into a php variable. I have
something like this:

<some JS>
var name = bob;
</js>

This is at the end of a function. My first thought was to do this:

<? $phpVariable = ?>name<? ; ?>

But I think it will choke at the end of the first delimter because
its a statement that is not closed by a semicolon..

anyone?

Tom





More information about the thelist mailing list