Handling Images and Complexity PHP Help

You’ve come to a watershed moment in your programming career, however brief you feel that career has been. Up until this point in the book, you’ve been using a lot of PHP constructs-from if statements to some basic functions to constants and even error handling. You’ve also become familiar with the basic MySQL interactions you’ll need in most 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 have a form that gathers information, you can handle that. You can grab information from a table, and you can put information into a table. You can respond to errors, redirect users, and even distinguish between a good user experience and a bad one.

In spite of all that. 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 much simpler situation than a complete web application that has ten pages, particularly when those ten tables connect and interact with one another, and even relate information in one table to information in another. Add to that image handling (something you started to dig into in order to finish your user form), some interaction with Facebook and Twitter, and allowing users to actually log in, and things get a lot trickier.

And that’s what’s next: the jump from thinking about single forms and single scripts to thinkin·g about entire systems. You’re ready to begin interacting with the file system-the place where your scripts, files, and images live. You’re ready to start thinking not just about a single table like but working with multiple tables. And, custom functions? You’ve already built two-debug_print and handle_error-so you’ve got a foundation upon which to build.

Along the way, though, the decisions become trickier. Complexity brings with it not just the question, “What do I do next?” but also, “Of the two or three ways I could solve this problem, which one is the best way?” So, get ready: you’re diving into deeper programming waters, which tend to comprise as much critical thinking and philosophy as they do new PHP and MySQL language features.

Posted on January 11, 2016 in Handling Images and Complexity

Share the Story

Back to Top
Share This