User's Manual

Extending the Basic Employee Form
5-8 Oracle Database Express Edition 2 Day Plus PHP Developer Guide Beta Draft
$lnm = htmlentities($empdetails['LAST_NAME']);
$eml = htmlentities($empdetails['EMAIL']);
$sal = htmlentities($empdetails['SALARY']);
$cpt = htmlentities($empdetails['COMMISSION_PCT']);
$eid = htmlentities($empdetails['EMPLOYEE_ID']);
echo <<<END
<form method="post" action="$posturl">
<table>
<tr>
<td>Employee ID</td>
<td>$eid</td></tr>
<tr>
<td>First Name</td>
<td><input type="text" name="firstname" value="$fnm"></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" name="lastname" value="$lnm"></td>
</tr>
<tr>
<td>Email Address</td>
<td><input type="text" name="email" value="$eml"></td>
</tr>
<tr>
<td>Salary</td>
<td><input type="text" name="salary" value="$sal"></td>
</tr>
<tr>
<td>Commission (%)</td>
<td><input type="text" name="commpct" value="$cpt"></td>
</tr>
</table>
<input type="hidden" value="{$empdetails['EMPLOYEE_ID']}"
name="empid">
<input type="submit" value="Save" name="savemodifiedemp">
<input type="submit" value="Cancel" name="cancel">
</form>
END;
}
}
15. Save the changes to your Anyco application files, and test the changes by entering
the following URL in you Web browser:
http://locahost/~<username>/chap5/anyco.php
The list of all employees is displayed with a radio button in each row.