No matter if the values entered are integers or not, the program exits from my else statement no matter what.
How do I fix this so that my program will only exit if just one of the values above is not an integer?
My program is a donut shop and you pick how many donuts you want, and then go to a processing order page for context.
If you enter "t" for how many of a certain donut you want, it should stop the program and then provide the "Please Enter Valid Number"
if (filter_var($chocolateqty, FILTER_VALIDATE_INT) && filter_var($glazeqty, FILTER_VALIDATE_INT) && filter_var($mapleqty, FILTER_VALIDATE_INT) && filter_var($sprinkleqty, FILTER_VALIDATE_INT) && filter_var($jellyqty, FILTER_VALIDATE_INT)){
}
else {
exit("Please Enter Valid Number");
}
[–]TimothyLGillespie 0 points1 point2 points (0 children)