Home  >  Q&A  >  body text

Enter the score ABC and still fail.

html page:

<!DOCTYPE HTML>

<html>

<head>

<meta charset=" utf-8">

</head>

<body>

<h1>score</h1>

< ;form action="work.php" method="post">

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

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

</form>

</body>

</html>

php page:

<?php


##$fs=$_POST['fs'];

echo $fs.'<br />';

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

echo 'failed';

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

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

}else if($fs >= 70 && $fs < 80) {

echo 'Not bad';

}else if($fs >= 80 && $fs < 90){

echo 'There is hope for Tsinghua University' ;

}else if($fs >= 90 && $fs < 100){

echo 'Tsinghua University has a chance';

}elseif($ fs >= 100 ){

echo 'Einstein is reincarnated, Smecta';

}elseif(!is_numeric($fs) && $fs < 0){

echo 'Please enter the correct score';

}

?>


唐2411 days ago1422

reply all(1)I'll reply

  • 唐

    2018-04-07 08:24:34

    has been resolved!

    reply
    0
  • Cancelreply