a user need to put a score through prompt box in javascript and then a grade need to echo in php using if-else statement.I wrote the below code but it's not working.Please help me to make it right.Thanks.
<!octype html>
<html>
<body>
<script type="text/javascript">
var t= prompt("Please enter a value between 0 to 100");
<?php $t = "<script>document.write(t)</script>"?>
</script>
<?php
if ($t >= 80 && $t<=100) {
echo "Your grade is A+";
} elseif($t >= 70 && $t<80) {
echo "Your grade is A";
} elseif($t >= 60 && $t<70) {
echo "Your grade is B";
}elseif($t >= 50 && $t<60) {
echo "Your grade is C";
}else {
echo "Your grade is Fail";
}
?>
</body>
</html>