I simple grade solver using PHP programming language to solve the grade the average of the students.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.

Program Listing

index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

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

<title>Grade Solver in PHP</title>

</head>

<style type="text/css">

  body {

    font-family: arial;

    size:14px;

  };

</style>

<body>

  <h3>Grade Solver in PHP </h3>

  <p> Created By Prof. Jake Rodriguez Pomperada, MAED-IT, MIT </p>

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

<table width="301" border="1">

  <tr>

    <td width="141">Enter Prelim:</td>

    <td width="144"><label>

      <input type="text" name="txtpre" id="textfield" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Midterm:</td>

    <td><label>

      <input type="text" name="txtmid" id="textfield2" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Semifinal:</td>

    <td><label>

      <input type="text" name="txtsem" id="textfield3" />

    </label></td>

  </tr>

  <tr>

    <td>Enter Final:</td>

    <td><label>

      <input type="text" name="txtfin" id="textfield4" />

    </label></td>

  </tr>

  <tr>

    <td><label>

      <input type="submit" name="submit" id="button" value="Compute" />

    </label></td>

    <td><label>

      <input type="reset" name="clear" id="button2" value="Clear" />

    </label></td>

  </tr>

</table>

<p>&nbsp;</p>

</form>

</body>

</html>


grade_result.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Grade Solver</title>
</head>

<body>
  <style type="text/css">
  body {
    font-family: arial;
    size:14px;
  };
</style>
<?php
error_reporting(0);
$pre = $_POST['txtpre'];
$mid = $_POST['txtpre']; 
$sem = $_POST['txtsem'];
$fin = $_POST['txtfin'];

$avg=($pre + $mid + $sem + $fin)/4;

if ($avg <=75)
{
$remarks="POOR";
}
else if ($avg<=80)
{
$remarks="Needs Improvements";
}
else if ($avg<=85)
{
$remarks="GOOD";
}
else if ($avg<=90)
{
$remarks="Excellent";
}
else 
{
$remarks="Outstanding";
}
?>

<h3>Grade Results </h3>
<table width="348" border="1">
  <tr>
    <td width="174">Prelim Grade:</td>
    <td width="158"><?php echo $pre; ?></td>
  </tr>
  <tr>
    <td>Midterm Grade:</td>
    <td><?php echo $mid; ?></td>
  </tr>
  <tr>
    <td>Semi-Final Grade:</td>
    <td><?php echo $sem; ?></td>
  </tr>
  <tr>
    <td>Final Grade:</td>
    <td><?php echo $fin; ?></td>
  </tr>
  <tr>
    <td>Your Average is:</td>
    <td><?php echo $avg; ?></td>
  </tr>
  <tr>
    <td>Your Remarks is:</td>
    <td><?php echo $remarks; ?></td>
  </tr>
</table>
</body>
</html>

Leave a Reply

Your email address will not be published.