Click to See Complete Forum and Search --> : Javascript with PHP and MySQL
Count_Rugen
10-09-2003, 09:56 PM
My knowledge of Javascript is very limited. I am developing a site using PHP and MySQL and want to incorporate some Javascript. I want to include info from the mysql database in my Javascript stuff. Is there any way that Javascript can communicate with MySQL or variables set in PHP? I have done a little before by passing variables in the url and retreiving them with javascript, but i cant do that this time.
Any suggestions?
Cheers
Count Rugen
Khalid Ali
10-09-2003, 11:19 PM
you can communicate with MySQL suing php,JavaSCript is client side scripting language you can not pass value to php or MySQL directly other then submitting a documet to php using HTTP request.
However you can se any value from php mysql on client side
Count_Rugen
10-10-2003, 02:09 AM
thanks :)
chestertb
10-10-2003, 02:42 AM
Khalid,
You said "However you can se any value from php mysql on client side".
Can you explain that in a little more detail please? How can you see? Do you just assign the value from the php variable to the Javascript variable or do you have to use php to assemble the page on server side with the value and javascript code already in it?
Please give an example... say I want to take the client's first name (stored in my sql database) and use it in something I'm doing in Javascript.
Thanks
IB