Chapter 8. Handling Images and Complexity

You’ve come to a real watershed moment in your programming career. Up until now, you’ve been using a lot of PHP constructs—from if statements to some basic functions to constants and even error handling—and have gotten familiar with the basic MySQL interactions you’ll need in typical PHP scripts. With what you already know, you’re ready to take on most of the basic programming problems you’ll run across in a typical web application, as long as you’re thinking on a single-page level.

In other words, if you’ve got a form that gathers information, you can handle that. You can grab information from a table, and put information into a table, too. No problems there; you can respond to errors, redirect users, and even distinguish between a good user experience and a bad one.

But you know that web applications are greater than the sum of their single-page interactions. Ten different pages that interact with ten different tables is a lot simpler than a complete web application that has ten pages, but also has those ten tables interacting, connecting to each other, and even relating information in one table to information in another. Then, add to that image handling (something you’ve got to dig into to finish your user form), some interaction with Facebook and Twitter, and letting users log in, and things just got a lot trickier.

And that’s what’s next: the jump from thinking about single forms and single scripts to thinking about entire systems. You’re ...

Get PHP & MySQL: The Missing Manual 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.