PHP and MySQL have become a serious and commercially viable system with which to develop web applications. With the relase of PHP 5, J2EE developers, in particular, are starting to take a second look at PHP. And while there are many books on the makret that describe PHP language syntax, there are ve
PHP Web Development with MySQL A Hands On Approach to Application Programming
β Scribed by Kenneth E. Marks
- Tongue
- English
- Leaves
- 515
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Introduction
The Life and Times of a PHP Script
Static Vs. Dynamic Websites
The Browser and the Server
The Server and PHP
Writing Your First PHP Script
Setting Up a Development Environment
Hello World!
Exercises
Why Variables Matter
Variables in PHP
Types of Variables
Constants
Exercises
Basic String Interpretation
Concatenation
Interpolation
Escaping
Heredoc
Exercises
Operators, Expressions, and Basic Arithmetic
Operators and Expressions
Math Functions
Arrays
Simple Arrays in PHP
Associative Arrays
Adding Values
Explicit Versus Short Array Syntax
Useful Array Functions
Multidimensional Arrays
Exercises
Truth, Comparisons, Conditions, and Compound Conditions
Comparison Operators
Conditional Logic
Compound Conditional Logic Using Logical Operators
Exercises
Verifying Variables and Type Checking
Verifying Variables
Verifying and Checking Variable Types
Exercises
Looping
Counting Loops
Sentinel Loops
Exiting and Continuing a Loop
Exercises
Functions
Simple Function
Function Parameters/Arguments
Returning Values from a Function
Further Advice On Writing Good Functions
Exercises
Working with HTML Forms
A Simple Form
Processing Our Form and Outputting Back to the Web Page
Cleaning It Up Using a Self Referencing Page
Exercise: Badlibs, Part 1
Inserting Data Into a MySQL Database
Using the MySQL CLI
Create a PHP Application to Insert Data
Exercises
Returning Data from a MySQL Database
Returning Database Rows in a PHP Application
Exercise: Badlibs, Part 2
Validating Form Data and Creating Sticky Fields
Modifying FullName Behavior Based On Validation
Adding Field Validation
Making the First and Last Name Fields Sticky
Testing Our Script with Sticky Fields
Exercise: Contact Form
Displaying a List of Item Details
Designing the Database
Creating the Database
Adding Movie Data
Creating the Main Movie Listing Page
Creating the Movie Details Page
Exercises
Adding Data Using the Web Application
Creating a Page to Add Movies
Complete Code Listing
Link to the βAdd a Movieβ Page from the Listing Page
Exercises
Removing Data Using the Web Application
Adding Deletion Links to Movie Listings
Creating a βRemove a Movie Pageβ
Complete Code Listing
Exercises
Editing Data Using the Web Application
Linking Movie Details to the Edit Page
Create the Editing Page
Complete Code Listing
Exercises
Working With Files and Feature Additions to Existing Code
Add a Field for File Information
Create a Folder for Uploaded Movie Image Files
Adding File Upload Capability
Displaying Thumbnail Images of Movies on Main Page
Displaying Movie Image on Details Page
Add Image File Uploads to the Editing Page
Displaying Image on Deletion Page
Exercises
Basic HTTP Authentication
Password Protection with HTTP Authentication
How Does HTTP Authentication Work?
Create authorizeaccess.php
Adding Authorization to Pages
Exercises
Persistence
Cookies
Session Variables
Cookies and Session Variables
The Database
Best Practices in Solving the Persistence Problem
Exercises
Creating Secure Web Applications
Secure Password Protection for Authenticating
Guarding Against SQL Injection
Leaking Information to Hackers
Preventing Cross-Site Scripting Attacks
File Uploads
Securing Your Session
Final Thoughts
Exercises
Adding User Logins
Create a user Table
Create a Signup.php script
Create a login.php Script
Create a logout.php Script
Allow Users with Administrative Access
Exercises
Adding a Navigation Menu
Create Navbar Logic
Add the Navigation Bar
Add Navigation Bar to Details Page
Add Login Link to Navigation Bar
Add Logout Link to Navigation Bar
Add Sign Up Link to Navigation Bar
Add Navigation Bar to addmovie.php
Add Navigation Bar to Unauthorizedaccess.php
Add Navigation Bar to editmovie.php
Add Navigation Bar to removemovie.php
Complete Code Listings
Exercises
Adding Reservation Features
Add Number of Copies and Number Reserved
Persisting Movie Reservations for Users
Checking Movies Reserved by Users
Modify Homepage Based On Access Privileges
Refactoring to Remove Duplicate Inclusions
Script for Reserving Movies
Adding Cart to Navigation Menu
Add a Script for a Shopping Cart
Navigating to Reserved Movies
Showing and Returning Reserved Movies
Features to Add
Flaws in This Application
Exercises
Introduction to Object-Oriented Programming in PHP
Classes
Properties
Encapsulation Using Access Modifiers
Accessor Methods
The $this Variable
General Purpose Methods
Instantiating and Using a Class
Validating Input to a Setter Method
Inheritance
Overriding Methods
Constructors
Creating Parameterized Queries Using OOP
Exercises
π SIMILAR VOLUMES
This is a comprehensive, practical guide for programmers who want to develop production-quality, database-enabled web applications with PHP and MySQL. Long-time developer Marc Wandschneider systematically addresses the entire process: not only coding, but also upfront application, user interface and
Third Edition now with bonus chapters. Have you ever wanted to design your own website or browser application but thought it would be too difficult or just didn't know where to start? Have you found the amount of information on the Internet either too daunting or not geared for your skill set or wor
Overview: Some basic foundations of PHP
Overview: Some basic foundations of PHP