PHP has gained a following among non-technical web designers who need to add interactive aspects to their sites. Offering a gentle learning curve, PHP is an accessible yet powerful language for creating dynamic web pages. As its popularity has grown, PHP's basic feature set has become increasingly more sophisticated. Now PHP 5 boasts advanced features--such as new object-oriented capabilities and support for XML and Web Services--that will please even the most experienced web professionals while still remaining user-friendly enough for those with a lower tolerance for technical jargon.If you've wanted to try your hand at PHP but haven't known where to start, then Learning PHP 5 is the book you need. If you've wanted to try your hand at PHP but haven't known where to start, then Learning PHP 5 is the book you need. With attention to both PHP 4 and the new PHP version 5, it provides everything from a explanation of how PHP works with your web server and web browser to the ins and outs of working with databases and HTML forms. Written by the co-author of the popular PHP Cookbook, this book is for intelligent (but not necessarily highly-technical) readers. Learning PHP 5 guides you through every aspect of the language you'll need to master for professional web programming results. This book provides a hands-on learning experience complete with exercises to make sure the lessons stick.Learning PHP 5 covers the following topics, and more:
How PHP works with your web browser and web server
PHP language basics, including data, variables, logic and looping
Working with arrays and functions
Making web forms
Working with databases like MySQL
Remembering users with sessions
Parsing and generating XML
Written by David Sklar, coauthor of the PHP Cookbook and an instructor in PHP, this book offers the ideal classroom learning experience whether you're in a classroom or on your own. From learning how to install PHP to designing database-backed web applications, Learning PHP 5 will guide you through every aspect of the language you'll need to master to achieve professional web programming results.
Chapter 1 Orientation and First Steps
PHP's Place in the Web World
What's So Great About PHP?
PHP in Action
Basic Rules of PHP Programs
Chapter 2 Working with Text and Numbers
Chapter 3 Making Decisions and Repeating Yourself
Understanding true and false
Building Complicated Decisions
Chapter 4 Working with Arrays
Looping Through Arrays
Using Multidimensional Arrays
Chapter 5 Functions
Declaring and Calling Functions
Passing Arguments to Functions
Returning Values from Functions
Understanding Variable Scope
Chapter 6 Making Web Forms
Useful Server Variables
Accessing Form Parameters
Form Processing with Functions
Displaying Default Values
Putting It All Together
Chapter 7 Storing Information with Databases
Organizing Data in a Database
Connecting to a Database Program
Creating a Table
Putting Data into the Database
Inserting Form Data Safely
Generating Unique IDs
A Complete Data Insertion Form
Retrieving Data from the Database
Changing the Format of Retrieved Rows
Retrieving Form Data Safely
A Complete Data Retrieval Form
MySQL Without PEAR DB
Chapter 8 Remembering Users with Cookies and Sessions
Working with Cookies
Storing and Retrieving Information
Login and User Identification
Why setcookie( ) and session_start( ) Want to Be at the Top of the Page
Chapter 9 Handling Dates and Times
Displaying the Date or Time
Parsing a Date or Time
Dates and Times in Forms
Displaying a Calendar
Chapter 10 Working with Files
Understanding File Permissions
Reading and Writing Entire Files
Reading and Writing Parts of Files
Working with CSV Files
Inspecting File Permissions
Checking for Errors
Sanitizing Externally Supplied Filenames
Chapter 11 Parsing and Generating XML
Parsing an XML Document
Generating an XML Document
Chapter 12 Debugging
Controlling Where Errors Appear
Fixing Parse Errors
Inspecting Program Data
Fixing Database Errors
Chapter 13 What Else Can You Do with PHP?
Sending and Receiving Mail
Uploading Files in Forms
The HTML_QuickForm Form-Handling Framework
Classes and Objects
Advanced XML Processing
Running Shell Commands
Talking to Other Languages
IMAP, POP3, and NNTP
Even More Things You Can Do with PHP
Appendix A Installing and Configuring the PHP Interpreter
is an independent software development and strategic technology consultant. He was a co-founder and the Chief Technology Officer of Student.Com and TVGrid.Com. At both companies, David oversaw the architecture and development of varied systems to deliver personalized dynamic content to users around the world. After discovering PHP as a solution to his web programming needs in 1996, he created the PX (http://px.sklar.com/), which enables PHP users to exchange programs. Since then, he has continued to rely on PHP for personal and professional projects. When away from the computer, David eats mini-donuts, plays records, and likes to cook. He lives in New York City and has a degree in Computer Science from Yale University.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Learning PHP 5 is an eagle. Eagles fall into the category of bird known as "raptors," a category that also includes falcons and hawks. There are two types of raptor: grasping killers, with beaks shaped for tearing and cutting and short toes with curved claws designed for killing; and grasping holders, with beaks shaped for tearing and biting, and longer toes designed for holding. Eagles are grasping killers. Sea eagles have special adaptations to their toes that enable them to grasp smooth prey such as fish. Their excellent vision enables all eagles to spot prey from the air or a high perch. The eagle then swoops down, grabs its prey, and takes off in flight again, in one graceful movement. Eagles often eat their victims while still flying, breaking them apart and discarding the nonedible parts to lighten their load. Eagles, like most raptors, often dine on sick or wounded animals.There are more than 50 species of eagle spread throughout the world, with the exception of New Zealand and Antarctica. All species of eagles build nests, or aeries, high above the ground, in trees or on rocky ledges. Apair of eagles will use the same nest year after year, lining it with green leaves and grass, fur, turf, or soft materials. The eagle will add to its nest each year. The largest eagle nest ever found was 20 feet deep and 10 feet across.Hunting, increased use of pesticides, and the diminishment of their natural environment, with the attendant reduction in food sources, have endangered many species of eagle. Mary Brady was the production editor and the copyeditor for Learning PHP 5. Leanne Soylemez was the proofreader. Mary Anne Weeks Mayo and Claire Cloutier provided quality control. Judy Hoer wrote the index.Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.David Futato designed the interior layout. This book was converted by Joe Wizda to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Mary Brady.
This is a great book. I used this to compliment my lessons at http://learnphpquick.com/ This book is well written, very accurate and will guarentee you sucess in learning PHP. In essence it is a must have. Another great project from o'reilly
Bottom Line Yes, I would recommend this to a friend
Probably the best book on a technical subject i have ever read. It is very clear, with very good examples, starts from the basics and explains everything in a nice way. I really loved how all the subjects were covered without making this book have an unneeded large size(like many others do).
Bottom Line Yes, I would recommend this to a friend
Found this book to be extremely helpful while going through the PHP course of O'Reilly School of Technology's PHP/SQL Programming Certification (http://www.oreillyschool.com/certificates/php-sql-programming.php) . Explains things very clearly and just how they need to be explained. I also like the approach. But overall, a wonderful supplement for the OST PHP Course lessons.
This book is what I have come to expect from O'Reilly books over the years: concise, on topic, and reasonably entertaining.
I have to admit that I haven't read the entire book, but that's a good thing. You don't have to in order to get good use from it. The first half dozen chapters give you the boilerplate of PHP and, as a long-time perl hacker, that put me in very familiar territory. I started noodling about with test programs right away. The rest of the chapters cover specific topics that you can read as you approach those programming problems, or ignore if they don't apply to you. It's very well organized in that respect.
If you are the cover-to-cover sort, you will find that it's entertaining enough to give you the material without putting you to sleep. And for folks who perhaps don't have years of programming or web experience, David Sklar lays out the concepts in language simple enough for everyone to pick up.
David Sklar (sp?) has a gift when it comes to technical tutoring. There are many authors out there who could learn from him, how to write in a clear and understandable way.
I've gone through four other php books and was only frustrated and confused until I read this one. So often times, tech writers start out with simple stuff that is almost common knowledge, followed immediately by over-the-top, advanced material that only gives me a headache. Not David with Learning PHP 5!
I can only hope that O'Reilly contracts him for future references.
I have read this book from cover to cover, and there's one thing that I can say for sure, "It's the best book I've ever read about a technical matter." It kept me interested in the topic, and the examples were extremely relevant.
I have read other books about php including Programming PHP by O'Reilly, but Learning PHP gets at the hear of how to use PHP to create dynamic websites. This book is great for begineers and for power users. There are some exercises at the end of the chapter to practice, but the nice thing is to be able to look at the answers for extra examples at the end of the book.
This book covered so much about php and it's power in so few pages. The book also covers the new PHP5 features and the last chapter makes you want to explore more about php.
This book is great for a beginner, but best for the intermediate programmer. David Sklar does a great job at explaining variables, arrays, functions, working with databases, sessions, and other useful tips and tricks. All of this is written in simple terms, which is a great plus... seeing how PHP has taken off beyond all expectations. Highly recommended... thanks David!