So I have been working on some code and have gotten some help the last few days, but now I am stuck again. I am trying to have an error pop up (using echo) when a user does not select a check box.
I have a variable $value set to 0 which is changed when users select a service(s) and hit submit causing it to increase. Instead I am getting a huge list of errors that look bad and unprofessional.
Here are the last few lines of my php code in which I am trying to get an error to return if my variable
$value = 0. I must also mention I am new to php.
[php]if ($value = 0) {
echo “Please choose one service.”;
}
if(in_array(‘a’ or ‘b’ or ‘c’ or ‘d’ or ‘e’ or ‘f’ or ‘g’ or ‘h’ or ‘i’, $services)) { // see if b is in the array
echo “The quote for the following service(s): " . implode(’, ', $service_list) . " will be a total of $” . number_format($value) . “.”;
}
}
[/php]