ON my form submit page, I want to do one of two things, based on whether or not a field is set to a certain value. It is the if statement that I want to set by, Here is the code:
<?php
$RO = $_POST['RO'];
$FollowUpContact = $_POST['FollowUpContact'];
$CustomerNotReached = $_POST['CustomerNotReached'];
$Q1 = $_POST['Q1'];
$Q2 = $_POST['Q2'];
$Q3 = $_POST['Q3'];
$Q4 = $_POST['Q4'];
$Q5 = $_POST['Q5'];
$LaborCode = $_POST['LaborCode'];
$Comments = $_POST['Comments'];
$HAPPY = $_POST['HAPPY'];
mysql_connect("");
mysql_select_db("");
if($CustomerNotReached=0){
$query = "UPDATE KEYCAD SET Hold='Y', FollowUpContact='$FollowUpContact', CustomerNotReached='$CustomerNotReached', Q1='$Q1', Q2='$Q2', Q3='$Q3', Q4='$Q4', Q5='$Q5', LaborCode='$LaborCode', Comments='$Comments', HAPPY='$HAPPY' WHERE RO=$RO";
}else{
$query = "UPDATE KEYCAD SET Hold='N', FollowUpContact='$FollowUpContact', CustomerNotReached='$CustomerNotReached', Q1='$Q1', Q2='$Q2', Q3='$Q3', Q4='$Q4', Q5='$Q5', LaborCode='$LaborCode', Comments='$Comments', HAPPY='$HAPPY' WHERE RO=$RO";
}
print $query."<br />";
$result = mysql_query($query) or die(mysql_error());
echo"Thank You! Information Updated.\n";
?>
Thanks in advance for any help