In my localhost (WampServer) environment i get "Notice: Undefined index: State in ..." the line number matches the first line of my if statement
<?php
$eastern = array('CT', 'DE', 'DC', 'ME', 'MD', 'MA', 'NH', 'NJ', 'NY', 'PA', 'RI', 'VT', 'QC', 'NL', 'PE', 'NS', 'NB');
$southern = array('AL', 'FL', 'GA', 'LA', 'MS', 'NC', 'SC', 'VA', 'WV');
$central = array('IL', 'IN', 'KY', 'MI', 'OH', 'TN', 'WI', 'ON');
$great_plains = array('AR', 'CO', 'IA', 'KS', 'MN', 'MO', 'MT', 'NE', 'NM', 'ND', 'OK', 'SD', 'TX', 'WY', 'MB', 'SK', 'NT');
$western = array('AK', 'AZ', 'CA', 'HI', 'ID', 'NV', 'OR', 'UT', 'WA', 'AB', 'BC', 'YT');
if (in_array($_POST['State'],$eastern)) {
$_SESSION['membersRegion'] = 'Eastern';
} else {
$_SESSION['membersRegion'] = 'International';
}
?>
No error on the remote server but the if statement fails, the reponse is always "International" when I insert any of the state codes in the $eastern array in the "State" field of the form.
Dennis