Instructions:
Create a form that calculates an employee's weekly gross salary based on the number of hours worked and an hourly wage that the employee enters.
The form should contain two text boxes - one for the hours and one for the hourly wage. Any hours over 40 are considered extra hours and should be computed as time-and-a-half.
Code:
<?php
$hours=$_POST['hours'];
$wage=$_POST['wage'];
if($hours>40)
{
$result=($hours*$wage)*1.5;
echo "<b>This is your gross salary PLUS time and a half:</b>" $result;
}
else
{
$result=$hours*$wage;
echo "<b>This is your gross salary:</b>" $result;
}
?>
error on line "9"
Thanks
Bookmarks