Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This book is for the developer who has stumbled on to PHP and wants to know how to get things done. You should know the basics of programming, and chances are you've seen many online code samples. But you may be wondering why some examples are much more complicated than others when they do the same thing.
Care has been taken to keep the examples in this book as simple as possible and to explain as much as possible about every piece of code. To keep client and server code confusion to a minimum, there isn't much JavaScript here. Everyone's impatient, so Chapter 1, "The FAQs of Life—The Scripts Every PHP Programmer Wants (or Needs) to Know," contains quick solutions to everyone's favorite little tasks and problems. After you calm down, take a look at Chapter 2, "Configuring PHP," to find out how you should install and configure PHP—quite a large number of problems arise from misconfiguration. Continuing in this vein, Chapter 3, "PHP Security," deals with keeping your scripts secure.
Chapter 4, "Working with Forms," returns to basics—specifically, how to get user input from forms and other dynamic input sources. Chapter 5, "Working with Text and HTML," shows how to process text and strings with a number of tools, including regular expressions. Chapter 6, "Working with Dates," discusses how to work with times and dates in PHP and MySQL, and Chapter 7, "Working with Files," deals with file manipulation.
With these fundamentals covered, Chapter 8, "User and Session Tracking," covers the details of session tracking and management. With multiple users on a complex website, it's important to keep track of what each user is doing so that one user's session doesn't interfere with another's.
Chapter 9, "Working with Email," and Chapter 10, "Working with Images," cover email and image manipulation, respectively. These tasks are often ill-suited for webserver scripts, so the chapters describe relatively lightweight tasks that can add significant value to your site.
In Chapter 11, "Using cURL to Interact with Web Services," you'll learn how to make your server interact with web services on other sites via XML.
Finally, Chapter 12, "Intermediate Projects," contains three fun little projects that can be incorporated into larger websites. These projects build on what you've learned elsewhere in the book.