Always Learning

Advanced PHP for Web Professionals
Christopher Cosentino

ISBN-10: 0130085391
ISBN-13:  9780130085399

Publisher:  Prentice Hall
Copyright:  2003
Format:  Paper; 368 pp
Published:  10/29/2002
Status: Instock


Customers outside the U.S., click here.


Print this content

In this section:


Description

The book covers using XML with PHP, Session support, developing common database scrpts, bug management, using the GD library, creating PHP-CTK applications and more. This book includes several complete scripts that include a shopping cart, database manager, meeting manager, and a statistic tracker. Each script is thoroughly explained so that you can easily understand the significance of each line. All of the examples scripts are written in a modular fashion so that you can use all or parts of the example scripts in your own applications.


Table of Contents



Preface.


Goal Of This Book.


Who This Book Is For.


Getting The Code.


Acknowledgements.


The Fine Print.


1. PHP Review.

Overview. PHP Syntax. Operators. Arithmetic Operators. Assignment Operators. Comparison Operators. Concatenating Strings. Arrays. If/Then Statements. Switch Statements. For Loops. Foreach Loops. While Loops. Do While Loops. User-defined Functions. Object Oriented Programming With PHP. phpinfo(). Additional Resources.



2. Session Management.

Introduction to Session Management in PHP4. Initial php.ini Settings For Session Management. On Windows. On Linux. General Considerations. Starting a Session. The Contents of Session Files. Tracking Variables Across Pages During A Session. Unregistering Session Variables. Destroying Sessions. A Simple Session-based Shopping Cart.



3. Multi-database Interaction.

Advanced Database Interaction in PHP4. Database Specific Functions In PHP. Connecting To The Database Server. Selecting The Proper Database. Querying The Database To Insert, Read, Or Delete Data. Obtaining The Results Of Your Queries To Present To The User. DBX - PHP Support For Multiple Databases. You can verify the DBX has been correctly installed by using the phpinfo()function and verifying DBX is listed under the configuration section. Enabling DBX in Windows. DBX Functions. BX Functions. Using DBX. Creating Your Own Support For Multiple Databases. Using Pear::DB. Downloading PEAR. Downloading PEAR from CVS. Back To The Basics.



4. Better Form Processing.

Introduction to Better Forms. Post and Get. Making Forms Friendly. Souping-up the script. Check For Spaces. Check For Minimum Number Of Characters. Add More Error Information. Form-Field Checking. Checking For Valid Email Addresses. Using $HTTP_GET_VARS and $HTTP_POST_VARS. Putting It All Together. Variable Variables.



5. Using What You Have Learned — A Simple Shopping Cart.

Introduction. Features Of The Shopping Cart. Simple Shopping Interface. Simple Administration And Management Interfaces. Setting It Up. The Code. cart.sql. cart.php. cart_inc.php. dbmanage.php. admin.php. checkout.php. finishorder.php.



6. Working With Files.

Overview. Opening Files. Reading Files. Closing Files. Putting It To Use. Data Mining. Parsing Large Files.



7. PHP Authentication Schemes.

User Authentication Overview. Generating Passwords. Authenticating Users Against Text Files. Authenticating Users By IP Address. Authenticating Users Using HTTP Authentication. Authenticating Users By Database Query.



8. Error Management.

Overview. Error Reporting. Types Of Errors In PHP. Error Reporting Settings In php.ini. error_reporting(). php.ini Setting: display_errors. php.ini Settings For Development & Testing. Logging Errors. Custom Error Handlers. Triggering Errors 251. Tracking User Logins.



9. Using What You Have Learned — A Meeting Tracker Application.

Introduction. Simple Administration Interface. Setting It Up. The Code. meeting.sql. meeting.php. meeting_inc.php. admin.php.



10. PHP and XML.

Overview. Creating An XML Parser. Defining the XML Parser. Defining The Element Handlers. Defining Character Handlers. Starting The Parser. Cleaning Up. Parsing and Transforming XML Documents. Dumping Database Contents Into An XML File.



11. Generating Dynamic Graphics With PHP.

Overview. The GD Library. Enabling GD support. Enabling GD For Windows. Enabling GD for Linux. Generating Graphics with GD. The Lines and Text. Adding TrueType Font To Your Images. Adding Text To Base Images. Creating Rectangles with GD.



12. PHPGTK.

Introduction to PHPGTK. Installing PHPGTK. Before You Install. Installing on Windows. Installing on Linux. Creating Basic GTK Objects. Creating Your First PHPGTK Window. Adding a GTK Button. Modifying Basic Widget Appearance. Text Entry. hbox and vbox. pack_start. Putting It All Together. Dialog Boxes. A Simple PHPGTK Application.



Back to top

Print this content

In this section:


Sample Chapter

View a Sample Chapter PDF:/samplechapter/0130085391.pdf


Author Bios

CHRISTOPHER COSENTINO is currently a technical writer for Cisco Systems, Inc. He has been a freelance Web developer since 1996, specializing in the use of PHP to build e-commerce applications. He is author of Essential PHP for Web Professionals (Prentice Hall PTR).


Backcover Copy

  • Build complex, PHP-driven Web sites—fast!
  • Discover powerful new PHP techniques, hands on!
  • Learn all-new techniques based on PHP-GTK and PEAR::DB
  • Master XML parsing, user authentication, forms processing, data mining, and much more

Take your PHP programming skills to the next level!

In this concise, hands-on tutorial, PHP expert Christopher Cosentino delivers dozens of powerful new techniques for building serious Web applications. Through professional-quality examples drawn from his six years as a PHP developer, Cosentino walks you through building friendlier, more usable sites; improving user authentication; generating dynamic graphics; parsing XML documents; building database-independent Web applications; and much more!

Take PHP to the limit... and beyond!

  • Manage sessions more effectively
  • Interact with multiple databases via PEAR::DB
  • Improve your form processing scripts
  • Parse large files and perform data mining
  • Authenticate users by IP address, database query, or HTTP authentication
  • Create custom error handlers
  • Dump database contents into XML files
  • Use PHP-GTK to build client-side cross-platform GUI applications
  • And more...

Back to top

Print this content

This product is a member of the following series. Click on the series name to see the full list of products in the series.

Back to top

Log in to the Instructor Resource Center

Login name: 

  Password: 

Forgot login/password?  |  Need to redeem an access code?

        

Instructor Resource Center File Download

This work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning. Dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permitted. The work and materials from this site should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials.

Cancel     I accept, proceed with download

Print this content

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.

Back to top