HI Can someone please help me. the book sucks, teacher will not help me (says I will not learn), I am trying to calculate Pay check. Just hours worked, pay, and overtime.
:rolleyes:
Script is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Calculate Your PayCheck</title>
</head>
<body>
<h1>Calculate Your Paycheck</h1>
<form method = "post"
action = "Paycheck.php">
<table border = 1>
<tr>
<th>Hours Worked
<input type = "integer"
name = "hoursWorked"
value = "">
</th>
</tr>
<tr>
<th>Wages
<input type = "integer"
name = "wages"
value = "">
</th>
</tr>
<tr>
<td colspan = 2>
<center>
<input type = "Submit"
value = "Submit">
</center>
</td>
</tr>
</table>
<?PHP
$hoursWorked = $_REQUEST["hoursWorked"]
$wages = $_REQUEST["wages"]
$pay = $_REQUEST["pay"]
$payCheck = $_REQUEST["payCheck"]
$x = hoursWorked;
$y = wages;
$z = pay;
$zz = overtimeHours;
if ($x is <= 40){
$submit = ("$x * $y = $z")
echo "Your Paycheck is: $paycheck";
}
if ($x is > 40){
$submit = ("$x - 40 * $y * 1.5 =$z")
echo "Your Paycheck is: $paycheck";
}
?>
</center>
</form>
</body>
</html>
Thanks