Select box selecting
Posted: Tue Jun 13, 2006 6:13 am
Hi, I have the following code, what I want to do is submit that form when an option is selected, is there some way I can do this?
My reasoning for this is that I wish to populate another select box depending on what this one is.
Thanks very much.. Tom
My reasoning for this is that I wish to populate another select box depending on what this one is.
Code: Select all
<?php
//Code to display the region select box from the DB
include("include-mysql.php");
$query = "SELECT regionName from Region ORDER BY regionName ASC";
$result = mysql_query($query) or die(mysql_error().'<p>'.$query.'</p>');
$i = 0;
echo '<form name="RegSel" method="get" action="register.php"><select name="Region">';
while ($row = mysql_fetch_array($result)) {
echo '<option value="'.$row['regionName'].'">'.$row['regionName'].'</option>';
$i++;
}
?>