Okay, I'm sure this is an easy one for you guys. You guys really know your stuff and it just seems easier sometimes to go straight to the source then to google and experiment for God knows how long. Forgive me for my ignorance of php. that's just the way it goes for a newb. Anyhow, to the point:
$sql="SELECT * FROM lookup_states";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result))
{
$state=$row["state"];
$options.="<OPTION VALUE=\"$state\">".$state;
}
?>
<SELECT NAME=state>
<OPTION VALUE=0>Please Choose State
<?=$options?>
</SELECT>
This is what is have so far to populate a drop down with a list of states to choose from. Problem is that when you submit the form the state don't submit to the table.
// Short Variables
$fn = $_POST['first_name'];
$ln = $_POST['last_name'];
$city = $_POST['city'];
$state = $_POST['state_province']; //<---------------------------
$cntry = $_POST['country'];
$ocntry = $_POST['other_country'];
$dob = $_POST['dob'];
$em = $_POST['email'];
$x1 = $_POST['example'];
$x2 = $_POST['example2'];
$x3 = $_POST['example3'];
// Skip ahead a little
// Insert fields into XINFO
$sql = "INSERT INTO xinfo (date_submit, first_name, last_name, city, state_province, country, other_country, dob, email)
VALUE (CURDATE(), '$fn', '$ln', '$city', '$state', '$cntry', '$ocntry', '$dob', '$em')";
All other info but $state shows in the table. I'm sure it's a REALLY simple fix. Any help is appreciated.