Hello!

I need some urgent help with a web page that I'm trying to make.
It is a search function.
In the first drop down list you choose area, when area i choosen the next dropdown list shows all countries in that area. When country is choosen the third drop down list shows all cities in that country.

I understand that some javaScript is neccessary, but I do not know how and where. The methos that has to be used is "GET".

This is what I have come up with sofar....
Would appreciate if someone could help me with some coding.

Kind regards

/Christine



PHP Code:
<?
require("vcat/include/hotel.php");

include("../../inc/header.php");

<?
      if($_GET_['area']!="Valj+varldsdel%3A")
      {
          $get_area = $_GET['area'];
      }
      else
      {
          $get_area = "";
      }
      
      if($_GET['country'] != "Valj+land%3A")
      {
        $get_country == $_GET['country'];
      }
      else
      {    
          $get_country = "";
      }
 
      
?>
      
      <tr>
        <td width="8">&nbsp;</td>
        <td width="498"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
    <form name = "myform" method = "get" action = "test.php" >
             <td valign="middle">&nbsp;<strong>1.</strong>
             <input type = "hidden" name = "action" value = "test"> 
    <select name="area" onchange = "submit()">
    <option selected>Valj varldsdel:</option> 
    <?    
    $query_result_area = mysql_query("SELECT area FROM properties WHERE status=1 GROUP BY area") OR die ("Error: " . mysql_error());
        while ($result_row_area = mysql_fetch_array($query_result_area)) 
    {
    $area = $result_row_area['area'];
    $area = strtoupper($area);
    if($area == $get_area)
    {
            echo "<option " . $area . " selected>" . $area . " </option>"; 
    }
    else
    {
                        echo "<option " .$area . ">" . $area . " </option>"; 
    }
    }
    ?>
             </select>
             &nbsp;<strong> 2.</strong>
             <select name = "country" onchange = "submit()">
             <option selected>Valj land:</option>
    <?
    if($get_area!="")
    {
        $query_result_country = mysql_query("SELECT country FROM properties WHERE area= '$get_area' AND status=1 GROUP BY country") OR die ("Error: " . mysql_error());
        while ($result_row_country = mysql_fetch_array($query_result_country)) 
        {
            $country = $result_row_country['country'];
            if($country==$get_country)
            {
                echo "<option " . $country . "selected>" . $country . " </option>"; 
            }
            else
            {
            echo "<option " . $country . ">" . $country . " </option>"; 
            }
                }
        ?>
                  </select>
                  &nbsp;<strong>3.</strong>
                  <select name="valj_stad">
                    <option selected>V&auml;lj stad:</option>
        <?
        if($selected_area != "" and $selected_country != "")
        {
        $query_result_city = mysql_query("SELECT city FROM properties WHERE country='$get_country' AND status=1 GROUP BY city") OR die ("Error: " . mysql_error());
        $selected_city="";
            while ($result_row_city = mysql_fetch_array($query_result_city)) 
        {
            $city = $result_row_city['city'];<br>
            if($val != "" and $val2!= "")
            {
                echo "<option>" . $city . " </option>"; 
            }
        }
    
        ?>
                  </select>
        <input type = "submit" name = "Skicka" value = "OK">
          </form>
          </td>
                            <td valign="middle">  <img src="visahotell_button.gif" width="89" height="17" hspace="0" vspace="0"></td>
          </tr>
        </table></td>
        <td width="8">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
  </tr>
</table>