Cannot output if it is greater than 100
WING
WING 2018-02-02 13:56:05
0
4
1364

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>

</head>

<body>

<form action=" panduan.php" method="post" >

<input type="text" name="num">

<input type="submit" value="Submit ">

</form>

</body>

</html>

<?php

$num=$_POST['num'];

if ($num>=0 && $num<60){

echo 'Failed';

}elseif ($num>=60&&$num<70){

echo 'You passed, you have to work hard. ';

}elseif ($num>=70&&$num<80){

echo 'Not bad. ';

}elseif ($num>=80&&$num<90){

echo 'There is hope for Tsinghua University. ';

}elseif ($num>=90&&$num<100){

echo 'You have no hope in this life. ';

}elseif ($num=100){

echo 'There is no hope. ';

}elseif ($num>100){

echo 'Einstein is reincarnated, Smecta! ';

}else {

echo 'Please enter the correct score';

}

?>


WING
WING

reply all(3)
寻觅 beyond

If you want to determine equality, you should use two equal symbols ==

a==b to determine whether a is equal to b

a = b and assign b to a

寻觅 beyond

}elseif ($num=100){ Here, an equal represents an assignment. Assign 100 to $num. The assignment is always true and will not continue to judge subsequent conditions.

  • reply Well, thank you
    WING author 2018-02-02 16:17:12
不靠譜°ζ

There is less equal sign after the greater than sign

  • reply But there is an equal sign in front of it
    WING author 2018-02-02 14:37:19
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template