You won't write a word processor, database server, or telephony gateway in PHP, nor will you use the language for complex mathematical modeling. PHP is meant to solve the kinds of problems that the creators of dynamic Web sites encounter. The authors of PHP Professional Projects have solved some of the biggies for you. This book has considerable merit: the pages explain how to write product catalogs, shopping carts, session-tracking routines, and user-authentication utilities in PHP, often with the MySQL database server holding up the back end. If you're the sort of reader who wants a quick solution, you'll be happy to find the solutions on a companion Web site. If you want to learn from the authors (after all, similar solutions are free for the taking on SourceForge and other code repositories) you'll be fairly pleased as well, since there are several nice tutorials.When it comes to the PHP code listings in this book, you'll either be impressed by the spacious layout with plenty of room for notes, or aghast at the amount of space taken up by uninterrupted, uncommented stretches of code. Either way, the code is solidly written--it's efficient and worth studying as part of your educational effort--but some weird and unnecessary line breaks damage the flow a bit. The main point: this is a book of solutions that work, with long code listings for people who like to study that way. --David Wall
Topics covered: Solving common Web site problems with PHP and MySQL. Sections address the fundamentals of PHP and MySQL, but the authors quickly transition into full applications: a shopping cart, a user authenticator, an e-mail sender, and a graphics-file manipulator are among the best.
This book provides a hands-on approach to learning PHP: Hypertext Preprocessor, which is a server-side scripting language. The book is aimed at both novice as well as advance level readers. Readers might only have the basic knowledge of HTML or might already know Web-based programming. The readers will use the PHP concepts that they learn in the book to create professional projects. The book starts with a few overview chapters that cover the key concepts of Web-based programming. These chapters act as an information store for programmers who may need to brush up their prior programming knowledge. A major part of the book revolves around professional projects. These projects enable programmers to learn about various tasks by following a simple to complex approach. Each project covers a specific subject area and guides the readers by using practical scenarios. The projects range from a simple project that involves creating plain data entry Web pages using HTML and saving the information in a text file. Then the books moves to complex projects that involve creating Web pages containing PHP scripts and storing information in MySQL databases. These projects help programmers to accomplish their goals by understanding the practical and real-life application of PHP in Web page designing. Each project in the book is a guide for the reader to create a part of a large Web site.
Apart from the overview chapters and the professional projects, this book also includes two additional sections, Beyond the Lab and Appendices. The Beyond the Lab section serves as both a summary of what the reader has learned throughout the projects and as a road map for where the reader can go to expand on this knowledge. This section also covers the future direction of the programming language. The Appendices act as a quick reference for PHP functions and certain concepts that a reader might want to explore further.
Use PHP to accomplish real-world, professional tasks.
Incorporating five hands-on projects, PHP Professional Projects is your key to unlocking the power of PHP. Each project focuses on a specific PHP concept and is based on a real-world situation. You will be able to use the skills that you develop throughout the book to modify the projects as needed to fit your professional needs.
CREATE A USER REGISTRATION FORM
Using various form elements, create a user registration form for an online shopping site. You will use PHP script to track form value and check for errors. Your PHP script will give you experience using variables, operators, and control structures.
STORE AND RETRIEVE DATA FROM FILES
Using the registration form that you have just created, you will learn how to store data in a file and to retrieve the data using various file functions. You will learn the basics of file handling such as reading and writing to a file as well as pack and unpack functions.
WORK WITH MYSQL USING PHP
Begin by creating a database table and inserting data with a form and PHP script. Query your database table based on specific criteria and allow results to be displayed. Further your understanding of handling data storage and using PHP with a SQL database.
CREATE A CATALOG AND SHOPPING CART
Cover all of the steps necessary to create a product catalog and shopping cart with PHP begin-ning with user registration. Learn how to add and remove products and customers and to send a feedback message using the mail function.
MASTER USER AUTHENTICATION AND TRACKING
Learn how to configure HTTP authentication on Apache and to create users. Begin with the basics of password-based authentication and password storage. Then create a PHP script that will validate users, and learn how to use cookies and sessions to track users.