PHP for Absolute Beginners

Book description

Get started in web development using PHP. Even if you've never programmed before, author Jason Lengstorf introduces you to PHP by building a PHP-based blogging site while covering all the good coding practices and skills that you'll need when you start your own projects.

Table of contents

  1. Copyright
  2. Dedication
  3. About the Author
  4. About the Technical Reviewer
  5. Acknowledgments
  6. Introduction
  7. Getting Started
    1. Setting Up the PHP Development Environment
      1. Why You Need Apache, MySQL, and PHP
      2. Installing PHP, Apache, and MySQL (the Hard Way)
      3. Choosing a Development Kit
      4. Installing and Using the Eclipse PDT
      5. Summary
    2. Understanding PHP: Language Basics
      1. Embedding PHP Scripts
      2. Variables and Datatypes
      3. Sending Data to the Browser as Output
      4. Commenting Your Code
      5. Operators
      6. Control Structures
      7. User-Defined
      8. Summary
    3. Passing Information with PHP
      1. Superglobal Arrays
      2. Summary
    4. Working with Databases
      1. The Basics of MySQL Data Storage
      2. Manipulating Data in MySQL Tables
      3. Opening a Connection
      4. Table Structure and a Crash Course in Planning
      5. Summary
  8. Building Your Blog
    1. Building the Entry Manager
      1. Planning the Entry Database Table
      2. Creating the Entry Input Form
      3. Create a Script to Process the Form Input
      4. Displaying the Saved Entries
      5. Fix the Redirect
      6. Summary
    2. Adding Support for Multiple Pages
      1. Add a page Column to the entries Table
      2. Modify Your Functions to Accept Page Parameters
      3. Modifying admin.php to Save Page Associations
      4. Saving Page Associations
      5. Using .htaccess to Create Friendly URLs
      6. Adding a Menu
      7. Creating Different Viewing Styles for the Pages
      8. Summary
    3. Updating and Deleting Entries
      1. Creating Administrative Links
      2. Displaying Administrative Links
      3. Passing URL Values to admin.php with .htaccess
      4. Populating Your Form with the Entry to Be Edited
      5. Updating Entries in the Database
      6. Handling Entry Deletion
      7. Confirming Your Choice to Delete an Entry
      8. Removing Deleted Entries from the Database
      9. Summary
    4. Adding the Ability to Upload Images
      1. Adding a File Input to the Admin Form
      2. Accessing the Uploaded File
      3. Writing the Image Handling Class
      4. Storing and Retrieving Images from the Database
      5. Resizing Images
      6. Summary
  9. Reaching Out to Site Visitors
    1. Syndicating the Blog
      1. What Is RSS?
      2. Creating an RSS Feed
      3. Publishing Your Feed
      4. Summary
    2. Adding a Commenting System to Your Blog
      1. Creating a comments Table in the Database
      2. Building a Comments Class
      3. Building the Comment Entry Form
      4. Storing New Comments in the Database
      5. Retrieving All Comments for a Given Entry
      6. Displaying Comments for a Given Entry
      7. Deleting Comments
      8. Summary
    3. Adding Password Protection to Administrative Links
      1. Adding an admin Table to the Database
      2. Adding Administrators in the Database
      3. Hiding Controls from Unauthorized Users
      4. Creating a Login Form
      5. Displaying Controls to Authorized Users
      6. Logging Users Out
      7. Summary
    4. Finishing Touches
      1. Email Validation
      2. Basic Spam Prevention
      3. "Post to Twitter" Link
      4. Summary
  10. Index

Product information

  • Title: PHP for Absolute Beginners
  • Author(s): Jason Lengstorf
  • Release date: October 2009
  • Publisher(s): Apress
  • ISBN: 9781430224730