Textbook Readings
Overview
To further enhance my knowledge of MySQL, I continued my reading of Larry Ullman's PHP and MySQL for Dynamic Web Sites. I read chapters 4, 5, and 9. At the end of chapter 9, I recreated a few example php programs from the text that utilize a MySQL Database to store form results. Please use the back button on your browser to return to this page after viewing each program below:
- A register script that allows a user to register, and saves the registration information in the database.
- A password script that allows a registered user to change their password.
- A view users script that allows you to view all of the users that have registered.
Chapter Summaries
Chapter 4
Chapter 4 provided an introduction to basic database principles, such as naming database elements, choosing column types, and choosing column properties. Afterwards, the book provided instructions to access MySQL, either with a MySQL client via the command prompt, or by using phpMyAdmin on a web server.
Chapter 5
Chapter 5 focuses on general SQL syntax. I first created a users table by using a CREATE statement, and then populated it with INSERT statements. In addition, Chapter 5 taught me several SQL commands and different conditionals, keywords, and functions to generate queries to sort the data in the table.
Chapter 9
In Chapter 9, I learned how to combine my knowledge of PHP and MySQL together to create PHP scripts that interact with a database. To do this, I created a mysqli_connect.php script that utilizes the mysqli_connect() function to create a database connection to my MySQL database. Afterwards, I recreated the PHP script examples in the book listed above that utilize the database to store the user submitted information.