I'm not interested in my other errors you see in the code just how to fix this particular problem
switch($var){
CASE 7: $SQL_Exec_String9="Update Address Set AddressLn1='$AddLn1', AddressLn2='$AddLn2', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefPhone='$Phone', PrefEmail='$Email' where PersonID=".$_SESSION['ID'];
echo "This is 9 ".$SQL_Exec_String9;//doesn't work
$cur3=odbc_exec($cnx, $SQL_Exec_String9);
break;
CASE 1: $SQL_Exec_String3 = "Update Address Set AddressLn1='$AddLn1', AddressLn2='$AddLn2', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefEmail='$Email' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String3);
echo "This is 3 ".$SQL_Exec_String3;
break;
CASE 2: $SQL_Exec_String4 = "Update Address Set AddressLn1='$AddLn1', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefPhone='$Phone', PrefEmail='$Email' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String4);
echo "This is 4 ".$SQL_Exec_String4;
break;
CASE 3: $SQL_Exec_String5="Update Address Set AddressLn1='$AddLn1', AddressLn2='$AddLn2', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefPhone='$Phone' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String5);
echo "This is 5 ".$SQL_Exec_String5;
break;
CASE 4: $SQL_Exec_String6="Update Address Set AddressLn1='$AddLn1', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefEmail='$Email' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String6);
echo "This is 6 ".$SQL_Exec_String3;
break;
CASE 5: $SQL_Exec_String7="Update Address Set AddressLn1='$AddLn1', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation', PrefPhone='$Phone' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String7);
echo "This is 7 ".$SQL_Exec_String3;
break;
CASE 6: $SQL_Exec_String8="Update Address Set AddressLn1='$AddLn1', AddressLn2='$AddLn2', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation' where PersonID=".$_SESSION['ID'];
$cur3=odbc_exec($cnx, $SQL_Exec_String8);
echo "This is 8 ".$SQL_Exec_String3;
break;
CASE 8: $SQL_Exec_String10= "Update Address Set AddressLn1='$AddLn1', Suburb='$Sub', State='$Province', Postcode='$Zip', Country='$Nation' where PersonID=".$_SESSION['ID'];
echo "This is 10 ".$SQL_Exec_String10;//doesn't work
$cur3=odbc_exec($cnx, $SQL_Exec_String10);//this should be string 10
break;
DEFAULT: echo "You must enter data in all the required fields";//doesn't work
PageRedirect('details.php');
break;
}
My problem of course is with those that have to assess three options rather than two cos they're the ones that don't work but Case 7 seems to use Case 1 instead o Case 7 and Case 8 uses Case 4