If Statement
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>If Statement</title>
</head>
<body>
<?php
//These are variables to hold the grades
$justinsgrade=70;
$aliciasgrade= 60;
$manuelsgrade= 80;
$raulsgrade=71;
$tonisgrade=79.9;
$griseldasgrade=80;
$grainasgrade=64;
$josesgrade=100;
//Here are the if statements to test
//whether students scored greater than 89.5 (I round up).
if ($justinsgrade >= 50)
{
print("Justin, you need to start doing better to pass.<br>");
}
if ($aliciasgrade >= 50)
{
print("Alicia, you are close to failing try harder.<br>");
}
if ($manuelsgrade >= 50)
{
print("Manuel, you are doing ok.<br>");
}
if ($raulssgrade >= 50)
{
print("Raul, you need to start doing better.<br>");
}
if ($tonisgrade >= 50)
{
print("Toni, you need a little more effort to get a good grade. <br>");
}
if ($griseldasgrade >= 50)
{
print("Griselda, I'm dissapointed in you, do better. <br>");
}
if ($grainasgrade >= 50)
{
print("Grainas, fail! Do better next time. <br>");
}
if ($josesgrade >= 90)
{
print("Jose, is the best student ever. <br>");
}
?>
</body>
</html>