Here is my code
Most of the erros that I am getting are
<h>Pay Stub</h>
You have used the element named above in your document, but the document type you are using does not define an element of that name. > is highlighted and underelined
Also
<span class=\"number\">$name</span>
You have used a character that is not considered a "name character" in an attribute value. The backslash in class=\ is highlighted and underlined.
</body>
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
I was hoping to get an out put like this:
Employee Name Employee ID Hours Pay Rate
(Calculate Button)
Pay Stub
Employee Name: Steve
Employee ED: 456
Hours Worked: 12.98
Pay Race: 4.98
Total Pay: 64.644
PayrollTax: 7.756848
Net Pay: 56.883552
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title> Payform form </title>
</head>
<body>
<div>
<form action="handle_form.php"
method="post">
<p> Employee Name <input type="text"
name="name" size="20" /></p>
<p> Employee ID <input type="text"
name="empid" size="10" /></p>
<p> Hours <input type="text"
name="hours" size="4" /></p>
<p> Pay Rate <input type="text"
name="payrate" size="6" /></p>
<input type="submit" name="submit"
value="Calculate" />
</form>
//Get the values from the $_POST array
$employeename =$_POST['name']
$employeeid =$_POST['empid']
$hours =$_POST['hours']
$payrate =$_POST['payrate']
//Calculate
$totalpay = $hours * $payrate
$payrolltaxrate = 0.12
$parolltax = $totalpay * $payrolltaxrate
$netpay = $totalpay - $deductable
//print result
<h>Pay Stub</h>
print "<div><p>Employee Name :<br />
<span class=\"number\">$name</span>
Emplyeee ID :<br /><span class=\"number\">$empid</span>
Hours: <br /><span class=\"number\">$hours</span>
Pay Rate: <br /><span class=\"number\">$payrate</span>
Total Pay: <br /><span class=\"number\">$totalpay</span>
Payroll Tax: <br /><span class=\"number\">$parolltax</span>
Net Pay: <br /><span class=\"number\">$netpay</span></p></div>";
?>
</body>
</html>
Most of the erros that I am getting are
<h>Pay Stub</h>
You have used the element named above in your document, but the document type you are using does not define an element of that name. > is highlighted and underelined
Also
<span class=\"number\">$name</span>
You have used a character that is not considered a "name character" in an attribute value. The backslash in class=\ is highlighted and underlined.
</body>
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
I was hoping to get an out put like this:
Employee Name Employee ID Hours Pay Rate
(Calculate Button)
Pay Stub
Employee Name: Steve
Employee ED: 456
Hours Worked: 12.98
Pay Race: 4.98
Total Pay: 64.644
PayrollTax: 7.756848
Net Pay: 56.883552