This script is a real world application that shows how to use MySQL with PHP. You can learn from the step by step commented php source code how to build a php program that uses MySQL to keep a database of your books. Program functions implemented include, saving a new record, listing of records for user selection, selection of a record and displaying its details, updating a record, deleting a record and searching for records. Once you have learned the techniques used in this program, you can build any php-mysql based programs. If you are looking for a full example source codes for a complete PHP program that shows how to use PHP with MySQL, then this package is for you.
Here's what you'll learn from this package.
- How to create and use functions in PHP
- How to use html forms to send data to a PHP script
- In a php script, how to properly retrieve data sent from a html form
- How to separate php code from html and css files
- How to display php generated data in html forms
- How to use php include files to avoid unnecessary code duplication
- In php functions, how to use variables defined outside the function
- In php functions, how to pass variables into the function so that they can be used in the function
- In php functions, how to return values of variables to the calling program.
- In a php script, how to connect to a MySQL database, execute a query, get the query results and the number of rows returned in the query result.
- How to dynamically fill a html form selection list with data returned from a mysql query.
- How to use regular expressions to validate certain data inputs
- In php script, how to redirect to another php script
- How to avoid problems in query strings by using str_replace and addslashes
- How to construct SQL queries that contain php variables.
- How to use php to handle html form input errors and report them to the user.



















