...

View Full Version : assigning javascript variable into php



sradha
03-11-2010, 06:29 PM
Can anyone tell me of how to take or assign a javascript variable into php.

bacterozoid
03-11-2010, 06:34 PM
Easiest way is to have that javascript variable stored in a hidden form input - then when the user submits the form on the page the variable goes right to the PHP with everything else.

If you're not using a form, then the only way would be to use Javascript to submit a request to a PHP script (AJAX).

Got any more details about what you're trying to do?

sradha
03-11-2010, 07:49 PM
Easiest way is to have that javascript variable stored in a hidden form input - then when the user submits the form on the page the variable goes right to the PHP with everything else.

If you're not using a form, then the only way would be to use Javascript to submit a request to a PHP script (AJAX).

Got any more details about what you're trying to do?

Thanks..I understood wat u meant



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum