hello all,
I need to find out how exactly can I interact these 2 variables in 2 drop down lists.
Here is the problem...
I have something like that in statesfiles.php:
$states = "Califonia, Taxes, Washigton";
$Califonia = "city1,city2,city3";
$Taxes = "city1,city2,city3";
//....and so on.
The form part is like this:
print "<SELECT NAME=\"sellerstates\"> ";
print "<option value=\"\">---Please select your states---";
//deal with states
$sellercityarray = explode(",", $sellerstateslist);
while (list($IndexValue, $sellerstatesselect) = each($sellerstatesarray))
{
echo "<option value=\"$sellerstatesselect\">$sellerstatesselect";
}
print "</select>";
The States drop down list prints out perfectly right now for the name of the States, but what i want is when I select Califonia from the State drop down list, it will automatically give me the City Names on the second drop down list. I know javascript might be needed for this to work, but can someone lead me to the right direction?
Thanks for your help