> I have a JavaScript function that onChange of a list box, 
 > takes the value of an option and grabs data from a MySQL 
 > table. My problem is how do I use the JavaScript var in my 
 > sql statement?

Javascript is client-side, php is server-side.  The only way to get
something that happens in javascript to interact with something that
needs to happen on the server is to reload the page and, in doing so,
pass those variables back to the server.  The main ways you would pass
variables back to the server are either GET args in a url or POST args
from a form.

Perhaps your onChange needs to include an implied submit so that the
form data can be passed back to the server.


--
----------------------------------------------------------------------
Outback Queensland Internet                   ************************
Longreach                                     ** New Web Site Online *
Queensland                                    ************************
Australia                                     W: www.outbackqld.net.au



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to