RE: [PHP] confused newbie on PHP and Javascript.

From: Date: Thu, 13 Jun 2002 22:36:43 +0000
Subject: RE: [PHP] confused newbie on PHP and Javascript.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102095@lists.php.net to get a copy of this message
> 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

« previous php.general (#102095) next »