I am trying to produce a string that will show only the checkboxes that are on. I think. I've been working on the whole project for days and I am quite worn out- this is the last thing needed, and I can't make it work!
It seems like it is very simple, but I'm not sure how to make the IFs stop. . . IFing.
if ($med1 == "ON") :
echo 'Preventec Collar: <b> ' .$quan1 . ' </b> <br>' ;
endif;
if ($med2 == "ON") :
echo 'Frontline Spray: <b> ' .$quan2 . '</b> <br>';
endif;
if ($med3 == "ON") :
echo 'Advantage Cats: <b> ' .$quan3 . '</b> <br>';
endif;
The med*'s are checkboxes scattered through the previous page, being clicked when the user wants that particular medicine.
med1 acts correctly, printing when checked and absent when blank, but no other IF statements will execute.
I've also tried
if ($med1 == "ON") {
echo 'Preventec Collar: <b> ' .$quan1 . ' </b> dd <br>' ;
}
With equally depressing results.