CalcBuilder Forum

3 options

Usuario moon_1800 2014-09-30 03:17:49

Need help team - thanks in advance
**********
Logic
*********
if user chooses "select" then output should be ""
if user chooses "Weekends" then "4 Weekend Selected."
if user chooses ""Most of the time then"4 Most of the time selected.";
******************************

my code is faulty please see


if($question4=="Weekends"){
$message4="4 Weekend Selected.";

}

if($question4=="Most of the time"){
$message4="4 Most of the time selected.";

}

else {
$message4="4 None Selected.";

}

Moonsoft support 2014-09-30 09:07:02

Hello,

Maybe with else structure, this is not working as expected. Try to add 'none selected' as default value and test then about 'question' value, like this:


$message4="4 None Selected.";

if($question4=="Weekends"){
$message4="4 Weekend Selected.";

}
if($question4=="Most of the time"){
$message4="4 Most of the time selected.";

}


Regards,

Usuario moon_1800 2014-09-30 09:34:14

thank you

Usuario moon_1800 2014-09-30 09:34:16

thank you

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!