This has been discussed so many times. Either use ajax or this way. In the first dropdown list, list all the states. Have an onchange event to submit the form for the 1st dropdown list. When a user selects an option from the 1st dropdown list, onchange event will be fired and the form will be submitted. You can then access the selected value of 1st dropdown list by doing $firstdropdownlistvalue = $_POST['dropdownlistname']; You can then query the database for this particular state and get all the cities in the 2nd dropdown list.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
Offline 3,878 posts
since Nov 2007