User's Manual

Adding Error Recovery
5-14 Oracle Database Express Edition 2 Day Plus PHP Developer Guide Beta Draft
<input type="submit" value="Next >" name="nextdept">
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Show Employees" name="showemp">
</form>
10. Edit anyco_ui.php. In ui_print_employees() change the HTML form to
enable it to call the department form:
...
</table>
<input type="submit" value="Modify" name="modifyemp">
<input type="submit" value="Delete" name="deleteemp">
&nbsp;&nbsp;
<input type="submit" value="Insert new employee" name="insertemp">
&nbsp;&nbsp;
<input type="submit" value="Return to Departments" name="showdept">
</form>
11. Save the changes to your PHP files. In your browser, test the changes by entering
the following URL:
http://localhost/~<username>/chap5/anyco.php
The Department Information page is displayed.
To display a list of employees in the department, click the Show Employees
button.
You can return to the Department view by clicking the Return to Departments
button. Experiment by navigating to another department and listing its employees
to show the process of switching between the Department and Employee forms.
Adding Error Recovery
Error management is always a significant design decision. In production systems you
might want to classify errors and handle them in different ways. Fatal errors could be
redirected to a standard "site not available" page or home page. Data errors for new
record creation might return to the appropriate form with invalid fields highlighted.