Hi, I have these two MySQL tables (location, properties). Each location can have one or more properties so both tables are related using Keys. What I'm trying to implement is an HTML form where when a user selects a location then the system automatically filters the properties results accordingly. The "location" list is loaded from MySQL using PHP, but obviously PHP doesn't allow me to filter the "properties" list while the selection is at the user side. I thought that this may be done using JavaScript? I don't know JavaScript so any help would be greatly appreciated. Cheers!
Hi, You will have to implement an ajax get request to achieve the desired behaviour. When the select is changed the you will have to execute get request using value of the selected option as query string. The target URL will process the query string and give back the html code of the second dropdown accordingly executing the sql query. When the result is ready the js will adopt the response to a target DOM element. Good luck Zoli