Lesson 31

Next Steps

Over the course of this book you have taken a static website and, piece by piece, turned it into a dynamic website run from a database using PHP and MySQL. You learned the basics of programming and PHP: how to set up your computer so that it runs PHP, how to add PHP to your HTML page, and how to write PHP code. You learned what variables are, how to work with them, and how to debug your programs. You learned how to have your program make logical decisions and to loop through code, how to create functions and process forms, and how to work with objects and classes. You learned best practices and how to write secure code.

You learned how databases work and how to design one, how to use phpMyAdmin to work with MySQL, and different ways of connecting to MySQL through PHP. You learned how to create tables, enter data, select data, change data, and delete data. And finally, you learned how to combine all of these things into creating a mini content management system with a dynamic menu.

Now that you know the basics of programming in PHP and working with a MySQL database, there are different “next steps” that you can take. One is to look back at the code that you wrote for the Case Study and take it to the next level. As you worked, you probably noticed that you did a lot of copying and pasting. When you start seeing a lot of similar code, it means you have code you should be reusing instead of copying. It's time to refactor, which is rewriting your code to make ...

Get PHP and MySQL® 24-Hour Trainer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.