From the Inside Flap
Welcome to PHP! This book has been written to be as comprehensiveand as accessibleas a book on PHP can be. It puts the power of PHP to work for you, pushing the envelope as far as it can go. The best way to learn any topic like PHP is by example, and this is an example-oriented book. You'll find dozens of tested examples here, ready to go to work.
PHP is quickly gaining popularity these days. Web page authors are requiring more and more power, and PHP is the answer. Not content to simply handle web pages in browsers any more, people are turning to the server side to do things you just can't do in a browser. Using PHP, you have total control over your web applicationsand the good part is that they're not any harder to write than a typical web page.
PHP is an amazing package, and you're getting into it at the right time, when the excitement level is soaring. You'll see more PHP here than in any similar book, doing things you won't see other places, such as drawing images on-the-fly on the server and then sending them back to the browser.
Who Should Read This Book?
This book is for you if you truly want to develop all the power of web applications. If you want to start using cookies instead of just having your browser accept them, if you want to handle buttons, text fields, check boxes and more in your web pages, if you want to track users with sessions, or if you want to connect to a database on the server, then look no further. This book lets you take control of the server side of things.
In addition, this book is specially written so that you don't need a lot of experience to use it. The only real requirement for this book is familiarity with HTML. You don't need to be an HTML expert, but you'll need to know some.
How Is This Book Organized?
This book contains nine chapters:
Chapter 1 provides a foundation, getting you started with PHP.
Chapter 2 is all about using operators and flow control in PHP to begin handling your data.
Chapter 3 handles text strings and organizes data into arrays.
Chapter 4 introduces functions, which let you wrap up PHP into manageable _sections that can be called by name.
Chapter 5 starts using PHP to work with HTML controls such as text fields and buttons in web pages.
Chapter 6 shows how to create web applications in more detail by checking what type of browser the user has, how to check the user's data, and more.
Chapter 7 introduces object-oriented programming in PHP and shows how to _handle files on the web server.
Chapter 8 discusses something that PHP does well: working with databases on the server. In this chapter, we'll work with MySQL.
Chapter 9 covers a number of important web techniques: using cookies, sessions, FTP, email, and more.
We have included a bonus chapter on the Web site that shows how to draw graphics interactively on the web server and send them back to the browser.You don't need to know anything about server-side programming. You get all the material you need right here.
As far as software goes, we'll be using PHP 5.0, and I'll show you where to download it for free. All you need to do is to download and install the required software (the installations are easy, unlike some larger software packages).
You don't need Internet access to learn PHP from this book. If you want, you can develop and test your PHP pages all on the same computer. However, if you want to put your PHP code on the Internet, you'll need to use an ISP that supports PHP. Check with your ISP to find if they support PHPmore and more ISPs are doing so every day.What's Unusual About This Book?
This booklike other books in the Spring Into... Seriesincludes the following _elements:
Each topic is explained in a discrete one- or two-page unit called a "chunk."
Each chunk builds on the previous chunks in that chapter.
Most chunks contain one or more examples. I believe that good examples provide the foundation for almost all useful technical documents.
Many chunks contain sidebars that provide helpful, ancillary material.
In addition, this book is filled with examplesdozens of thembecause seeing a working example is the best way to learn this material. Here are just a few included topics:
Reading data from a web page's text fields, radio buttons, check boxes, and list boxes on the server
Creating and handling image maps
Tracking users with sessions and cookies
Writing data to files on the server (such as guest books)
Recovering from errors without crashing
Connecting to databases on the server
Using SQL to work with databases
Drawing images on-the-fly and sending them back to the browser
Handling strings and arrays
Working with the PHP operators
Creating classes and objects
Using FTP from PHP
Sending email from PHP
Using sessions to preserve data between page accesses
The complete PHP syntax
There's a lot to PHP, and there's a lot to this book. Our plan is to cram as much PHP into the book as we can.All the code examples have been tested by the author and tech editor on different machines.
This book is designed to be at the top of the PHP field. If you have comments and suggestions for improvements, please write to me, care of Prentice Hall. This book is _designed to be the new standard in PHP programming books, more complete and more accessible than ever before. Please keep in touch with ways to improve it and keep it on _the cutting edge. Thanks. Who Helped Me Write This Book?
A book like this is the work of many people. Besides your local author, Mark L. Taub and Barry Rosenberg helped create and design the book. Matt Wade and Eugenia Harris did excellent reviews of the manuscript.
That's it. We're ready to dig into PHP on Chapter 1.
© Copyright Pearson Education. All rights reserved.
From the Back Cover
The fastest route to true PHP mastery!
So...you've been asked to pitch in on a PHP project...starting now. Or maybe one's on the horizon. Or maybe you need to get real PHP skills onto your résumé. You've done web stuff. Maybe used other scripting languages. Now you want to get productive with PHP, fast.
Welcome. We wrote this book for you. We'll leverage what you already know, so you'll go further, faster than you ever expected.
You'll get the real nuts and bolts, not theory or hooey. You'll learn through dozens of focused examples: tested for reliability, crafted for clarity, easy to adapt for your own projects.
Need specific solutions? This book's modular, high-efficiency format delivers theminstantly. Award-winning author Steven Holzner draws on his unparalleled experience teaching programming: No other PHP guide covers this much, this well, this quickly. Dig in, get started, get resultstoday!
All you need to succeed with PHP in Linux or Windows
Master core concepts: operators, flow control, strings, arrays, functions, and more
Learn essential web techniques: cookies, session management, automated email, FTP, and more
Use PHP 5's object model and object-oriented techniques
Efficiently handle text boxes, buttons, and other HTML controls
Create web forms, validate user input, and check browsers
Work with MySQL and other databases
Includes concise PHP 5 language and functional references!
All the book's programming examples are available for download on the companion web site.
Spring Into is a new series of fast-paced tutorials from Addison-Wesley. Each book in the series is designed to bring you up-to-speed quickly. Complex topics and technologies are reduced to their core components, and each component is treated with remarkable efficiency in one- or two-page spreads. Just the information you need to begin working...now! And because the books are example-rich and easy to navigate, you'll find that they make great on-the-job references after you've mastered the basics.
© Copyright Pearson Education. All rights reserved.