Page 504 - Beginning PHP 5.3
P. 504
Part III: Using PHP in Practice
$member->insert();
}
function displayThanks() {
displayPageHeader( “Thanks for registering!” );
?>
<p>Thank you, you are now a registered member of the book club.</p>
<?php
displayPageFooter();
}
?>
Test the register.php script by opening its URL in your Web browser. You can see from Figure 15-3
that the form looks and behaves much like the form in Chapter 14. The main difference is that
validation errors are displayed directly above the form fields, rather than at the top of the form.
Figure 15-3
How It Works
You can see that the structure of this register.php script is quite different than that of the Chapter 14
version. First of all, the script includes the common code file, along with the two PEAR packages,
HTML_QuickForm and HTML_QuickForm_Renderer_Tableless.
466
9/21/09 9:14:56 AM
c15.indd 466 9/21/09 9:14:56 AM
c15.indd 466

