<html>
<head>
<title> GRADE DETAILS </title>
</head>
<body>
<?php
$myname=$_GET ['myname'];
$mygrade=$_GET ['mygrade'];
if(($myname=='@' or $myname=='!'))
{
echo "Special character not allowed.";
}
else if($myname==" ")
{
echo "Please enter your name";
}
else
{
switch($mygrade)
{
case "";
echo "you did not enter grade";
break;
case A;
echo "Increment 30% of basic salary";
break;
case B;
echo "Increment 10% of basic salary";
break;
default;
echo"Wrong Grade";
break;
}
}
?>
</body>
</html>
我想在我的 if else 语句中设置多个条件..我尝试了很多方法,但仍然没有工作...我希望有人可以帮助我..与我的 Switch Case 无关,但问题仅在 IF ELSE ..请帮助。谢谢。