<form name="input" action="Paycheck.php" method="get">
Insert wage: <input type="text" name="wage" />
Insert hours worked: <input type="text" name="hours" />
<input type="submit" value="Calculate Salary" />
</form>
<?php
$hours = $_GET['hours'];
$wage = $_GET['wage'];
$salary = 0;
if(hours > 40)
{
$salary = 40 * $wage + ($hours - 40) * $wage * 1.5;
}
else
{
$salary = $hours * $wage;
}
echo $salary;
}