Jump to content

Archived

This topic is now archived and is closed to further replies.

amalosoul

How does Javascript

Recommended Posts

How does javascript access the variables which are sent through the GET method (from php)
Example: www.mysite.com?id=1
How can I use that variable id?

Share this post


Link to post
Share on other sites
It doesn't "access" them at all... nor do they come from PHP.  If you want, you could parse out the query string, or have your PHP script write out the necessary JS variable declaration directly.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.