samedi 10 octobre 2015

If Else Statement not working properly in my system [duplicate]

This question already has an answer here:

I have this bus reservation system, There are two classes of bus, one is "LazyBoy" and the other one is "GreyHounds". Whenever the user chose the type of class from the index it should echo in the checkout page, however that is not the problem, the problem is if i chose Lazyboy it should echo "True" else "False". but it only echo True even i chose GreyHounds.

<?php
 $classmap = $_POST['classmap'];
echo $classmap;

if($classmap = "LazyBoy"){
echo True;
}else{
echo False;
}

Aucun commentaire:

Enregistrer un commentaire