faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

can i get the value of a javascript variable in php code

Mar 24th, 2008 20:39
ha mo, Jason Benson, weslee raj,


The short answer is no.
PHP is a Server Side language and Javascript is commonly implemented as 
a Client Side language.
The two usually cannot (and should not) meet.  
That said, depending on what you want to do you could use AJAX to 
better integrate your Javascript with your Server Side coding.
A good article I've found on the subject is here, however a google 
search for AJAX will yield a wealth to explore.
http://www.phpbuilder.com/columns/kassemi20050606.php3
Hope that helps,
JB
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com