Hi,
I am trying to print different messages based on what is selected. The selections are stored in a database as $perm, and the options are low, intermediate and high. I am using switch, however i only get the first case printed:
$low = "Low";
$int = "Intermediate";
$high = "High ";
switch($perm) {
case $perm == $low: echo "Low perm <br>"; break;
case $perm == $int: echo "Intermediate perm <br>"; break;
case $perm == $high: echo "High perm <br>"; break;
default: echo "No information has been provided. ";
}
I have tried giving the options numerical values, however, when i retrieve the results they are still strings so comparint $perm == 1, 2, or 3 just prints the default message. Any help appreciated.