Web Database Applications with PHP and MySQL Source Code
Chapters 2 to 14, and Appendices F and H
Chapter 2
Chapter 3
-
Example 3-1
Use
Source
(2D planets and moons array)
-
Example 3-2
Use
Source
(printf examples)
-
Example 3-3
Use
Source
(strpos on a domain name)
Chapter 4
-
Example 4-1
Use
Source
(UnitCounter class definition)
-
Example 4-2
Use
Source
(Using UnitCounter)
-
Example 4-3
Use
Source
(UnitCounter constructor -- PHP 5 only)
-
Example 4-4
Use
Source
(UnitCounter constructor #2 -- PHP 5 only)
-
Example 4-5
Use
Source
(FreightCalculator class -- PHP 5 only)
-
Example 4-6
Use
Source
(Donation class -- PHP 5 only)
-
Example 4-7
Use
Source
(CaseCounter class -- PHP 5 only)
-
Example 4-8
Use
Source
(CaseCounter constructor -- PHP 5 only)
-
Example 4-9
Use
Source
(AirFreightCalculator -- PHP 5 only)
-
Example 4-10
Use
Source
(try/catch -- PHP 5 only)
Chapter 6
-
Example 6-1
Use
Source
(Simple database connection)
-
Example 6-3
Use
Source
(Database connection with a deliberate error and error handling)
-
Example 6-4
Use
Source
(Emulating SHOW TABLE)
-
Example 6-6
Use
Source
(HTML table output)
-
Example 6-8
Use
Source
(selectDistinct function example)
-
Example 6-9
Use
Source
(selectDistinct function)
-
Example 6-10
Use
Source
(simple region browser)
-
Example 6-11
Use
Source
(simple region displayer)
-
Example 6-12
Use
Source
(embedded link example)
-
Example 6-13
Use
Source
(simple region displayer)
-
Example 6-14
Use
Source
(database region displayer)
-
Example 6-15
Use
Source
(one component query redirection)
-
Example 6-16
Use
Source
(one component query test)
Chapter 7
-
Example 7-1
Use
Source
(PEAR DB example)
-
Example 7-2
Use
Source
(PEAR HTML_Template_IT customer template)
-
Example 7-3
Use
Source
(PEAR HTML_Template_IT customer example)
-
Example 7-4
Use
Source
(PEAR HTML_Template_IT region and winery template)
-
Example 7-5
Use
Source
(PEAR HTML_Template_IT winery and region example)
Chapter 8
-
Example 8-1
Use
Source
(Phonebook add entry HTML form)
-
Example 8-2
Use
Source
(Add phonebook entry)
-
Example 8-3
Use
Source
(Add phonebook template)
-
Example 8-4
Use
Source
(Add phonebook entry -- with redirect)
-
Example 8-5
Use
Source
(Add phonebook entry receipt)
-
Example 8-6
Use
Source
(Add phonebook receipt template)
-
Example 8-7
Use
Source
(Add phonebook entry)
-
Example 8-8
Use
Source
(Add phonebook entry template)
-
Example 8-9
Use
Source
(Add phonebook database script)
-
Example 8-10
Use
Source
(Add phonebook error template)
-
Example 8-11
Use
Source
(Update phonebook update entry template -- edit entry #1)
-
Example 8-12
Use
Source
(Update phonebook database script)
-
Example 8-13
Use
Source
(Add phonebook -- LOCK TABLES example)
-
Example 8-14
Use
Source
(Add phonebook -- auxiliary key table example)
-
Example 8-15
Use
Source
(Add phonebook -- PEAR DB example)
Chapter 9
-
Example 9-1
Use
Source
(Zipcode/postcode validation)
-
Example 9-2
Use
Source
(Email validation)
-
Example 9-3
Use
Source
(Credit/charge card validation)
-
Example 9-4
Use
Source
(Birth date validation)
-
Example 9-5
Use
Source
(Username form JavaScript validation)
-
Example 9-6
Use
Source
(Password form JavaScript validation)
-
Example 9-7
Use
Source
(Mouseover JavaScript example)
-
Example 9-8
Use
Source
(Shopping cart update JavaScript example)
-
Example 9-9
Use
Source
(Browser navigation and print JavaScript example)
-
Example 9-10
Use
Source
(Browser identification JavaScript example)
-
Example 9-11
Use
Source
(Menu actions JavaScript example)
-
Example 9-12
Use
Source
(JavaScript verify() validation function)
-
Example 9-13
Use
Source
(verify() function tester)
-
Example 9-14
Use
Source
(verify() function tester template)
Chapter 10
-
Example 10-1
Use
Source
(Basic sessions example)
-
Example 10-2
Use
Source
(Basic sessions example template)
-
Example 10-3
Use
Source
(Destroy a session)
-
Example 10-4
Use
Source
(Phonebook validation)
-
Example 10-5
Use
Source
(Add phonebook entry with interleaved error messages)
-
Example 10-6
Use
Source
(Phonebook tempate with interleaved errors)
Chapter 11
-
Example 11-1
Use
Source
(HTTP username and password display)
-
Example 11-2
Use
Source
(Collect HTTP credentials)
-
Example 11-3
Use
Source
(Collect HTTP credentials template)
-
Example 11-4
Use
Source
(Restricted access by IP address)
-
Example 11-5
Use
Source
(Restricted access by IP address template)
-
Example 11-6
Use
Source
(MD5 and crypt() examples)
-
Example 11-7
Use
Source
(authenticateUser() function)
-
Example 11-8
Use
Source
(Authenticate against a database)
-
Example 11-9
Use
Source
(login.html Login Page)
-
Example 11-10
Use
Source
(logincheck.php authentication script)
-
Example 11-11
Use
Source
(authentication.inc include file)
-
Example 11-12
Use
Source
(home.php Application homepage)
-
Example 11-13
Use
Source
(home.tpl Application homepage template)
-
Example 11-14
Use
Source
(logout.php logout script)
-
Example 11-15
Use
Source
(logout.tpl logout template)
-
Example 11-16
Use
Source
(password.php change password page)
-
Example 11-17
Use
Source
(password.tpl change password template)
-
Example 11-18
Use
Source
(changepassword.php change password validation)
Chapter 12
-
Example 12-1
Use
Source
(Custom error handler output)
-
Example 12-2
Use
Source
(Custom error handler with logging)
-
Example 12-3
Use
Source
(Controlling the buffering)
-
Example 12-4
Use
Source
(Custom error handler with logging, USER errors, and buffer control)
Chapter 13
Chapter 13
-
Example 14-1
Use
Source
(Shape class hierarchy -- PHP5 only)
-
Example 14-2
Use
Source
(Abstract class example -- PHP5 only)
-
Example 14-3
Use
Source
(Interface class example -- PHP5 only)
-
Example 14-4
Use
Source
(Interface class example #2 -- PHP5 only)
-
Example 14-5
Use
Source
(Interface class example #3 -- PHP5 only)
-
Example 14-6
Use
Source
(Abstract class example with protected functions -- PHP5 only)
-
Example 14-7
Use
Source
(Protected function implementations -- PHP5 only)
-
Example 14-8
Use
Source
(Christmas hamper class -- PHP5 only)
-
Example 14-9
Use
Source
(Freight calculator -- PHP5 only)
-
Example 14-10
Use
Source
(Freight calculator template)
Appendix F
-
Example F-1 to F-8
Use
Source
(mysql_sessions.inc database session handler)
-
Example F-9
Use
Source
(mysql_sessions.inc example)
Appendix H
-
Example H-1
Use
Source
(Using the regular mysql library)
-
Example H-2
Use
Source
(Using the improved mysql [mysqli] library)