Using PHP, MySQL and Javascript.. please help! - TechRepublic
Question
October 17, 2007 at 04:05 AM
helenmunzer

Using PHP, MySQL and Javascript.. please help!

by helenmunzer . Updated 18 years, 8 months ago

OK.. so I developing in PHP using a MySQL database, but I think I need Javascript to enable the following.

I want a page with 3 dropdowns, the second dropdown is dependant on the first, and the third on the second. The options in the dropdown are found in my database.

The first query to MySQL for the first dropdown list is fine, but then I want to use the onchange event to trigger the next dropdown – which should query the database again using the id of the chosen field in the first dropdown.

I can get the id using javascript, but how do I get that var into a query string of PHP to use for a mysql query?

Does this make any sense?

Or is there an easier way of doing this?

Thanks!

This discussion is locked

All Comments