The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

<h2>Job Search</h2>
<div class="entry">
<p>
<form name="form" action="" method="">
<fieldset><legend>Job Search</legend>
<?php
### Create the queries for the drop-down menus ###
### Getting the data from Mysql table for first list box ###
$quer2 = mysql_query("SELECT DISTINCT country_id,country FROM country order by country ASC");
### End of query for first list box ###
### for second drop down list we will check if country is selected else we will display all the states ###
$country = $_GET['country_id'];
if (isset($country)) {
$quer = mysql_query("SELECT DISTINCT state,state_id FROM state where country_id=$country order by state");
} else {
$quer = mysql_query("SELECT DISTINCT state,state_id FROM state order by state");
}
### End of query for second subcategory drop down list box ###
### for Third drop down list we will check if state is selected else we will display all the cities/////
$state = $_GET['state_id'];
if (isset($state)) {
$quer3 = mysql_query("SELECT DISTINCT city FROM city where state_id = $state order by city");
} else {
$quer3=mysql_query("SELECT DISTINCT city FROM city order by city");
}
### End queries for drop-down menu ###

Argh, that's tough ****! I tried to do the same thing a month ago, and ended up using JSON, as it was the only smooth, painless (ok, that's relative) solution for something that should be so simple. Here's my code for that:

<DIV id="dropdiv" style='display:none'>
//it is important to set display none here otherwise it will open on page load...i used a click event...if you use a mouseover/out you don't have to worry about this...
//then just include your other php in this 'sub'div!!!
<?php
include("whatever.php");
?>
</DIV>
</DIV>