PHP, MySQL & JavaScript All-in-One for Dummies

for Dummies, 2018

by Richard Blum


Explore the engine that drives the internet

It takes a powerful suite of technologies to drive the most-visited websites in the world. PHP, mySQL, JavaScript, and other web-building languages serve as the foundation for application development and programming projects at all levels of the web.

Dig into this all-in-one book to get a grasp on these in-demand skills, and figure out how to apply them to become a professional web builder. You’ll get valuable information from seven handy books covering the pieces of web programming, HTML5 & CSS3, JavaScript, PHP, MySQL, creating object-oriented programs, and using PHP frameworks.

Helps you grasp the technologies that power web applications
Covers PHP version 7.2
Includes coverage of the latest updates in web development
Perfect for developers to use to solve problems
This book is ideal for the inexperienced programmer interested in adding these skills to their toolbox. New coders who've made it through an online course or boot camp will also find great value in how this book builds on what you already know.

Table of Contents

Book I - Getting Started with Web Programming
Chapter 1 - Examining the Pieces of Web Programming
Creating a Simple Web Page
Kicking things off with the World Wide Web
Making sense of markup languages
Retrieving HTML documents
Creating a Dynamic Web Page
Client-side programming
Server-side programming
Storing content

Chapter 2 - Using a Web Server
Recognizing What's Required
The web server
The PHP server
The database server
Considering Your Server Options
Using a web-hosting company
Building your own server environment
Using premade servers
Tweaking the Servers
Customizing the Apache Server
Customizing the MySQL Server
Customizing the PHP Server

Chapter 3 - Building a Development Environment
Knowing Which Tools to Avoid
Graphical desktop tools
Web-hosting sites
Word processors
Working With the Right Tools
Text editors
Program editors
Integrated development environments
Browser debuggers

Book II - HTML5 and CSS3

Chapter 1 - The Basics of HTML5
Diving into Document Structure
Elements, tags, and attributes
Document type
Page definition
Page sections
Looking at the Basic HTML5 Elements
Text groupings
Marking Your Text
Formatting text
Using hypertext
Working with Characters
Character sets
Special characters
Making a List (And Checking it Twice)
Unordered lists
Ordered lists
Description lists
Building Tables
Defining a table
Defining the table's rows and columns
Defining the table headings

Chapter 2 - The Basics of CSS3
Understanding Styles
Defining the rules of CSS3
Applying style rules
Cascading style rules
Styling Text
Setting the font
Playing with color
Working With the Box Model
Styling Tables
Table borders
Table data
Positioning Elements
Putting elements in a specific place
Floating elements

Chapter 3 - HTML5 forms
Understanding HTML5 Forms
Defining a form
Working with form fields
Using Input Fields
Text boxes
Password entry
Radio buttons
Hidden fields
File upload
Adding a Text Area
Using Drop-Down Lists
Enhancing HTML5 Forms
Data lists
Additional input fields
Using HTML5 Data Validation
Holding your place
Making certain data required
Valdiating data types

Chapter 4 - Advanced CSS3
Rounding Your Corners
Using Border Images
Looking at the CSS3 Colors
Playing with Color Gradients
Linear gradients
Radial gradients
Adding Shadows
Text shadows
Box shadows
Creating Fonts
Focusing on font files
Working with web fonts
Handling Media Queries
Using the @media command
Dealing with CSS3 media queries
Applying multiple style sheets

Chapter 5 - HTML5 and Multimedia
Working with Images
Placing images
Styling images
Linking images
Working with image maps
Using HTML5 image additions
Playing Audio
Embedded audio
Digital audio formats
Audio the HTML5 way
Watching Videos
Paying attention to video quality
Looking at digital video formats
Putting videos in your web page
Getting Help from Streamers

Book III - JavaScript

Chapter 1 - Understanding JavaScript Basics
Knowing Why You Should Use JavaScript
Changing web page content
Changing web page styles
Seeing Where to Put Your JavaScript Code
Embedding JavaScript
Using external JavaScript files
The Basics of JavaScript
Working with data
Data types
Arrays of data
Controlling Program Flow
Conditional statements
Working With Functions
Creating a function
Using a function

Chapter 2 - Advanced JavaScript Coding
Understanding the Document Object Model
The Document Object Model tree
JavaScript and the Document Object Model
Finding Your Elements
Getting to the point
Walking the tree
Working with Document Object Model Form Data
Radio buttons

Chapter 3 - Using jQuery
Loading the jQuery Library
Option 1: Downloading the library file to your server
Option 2: Using a content delivery network
Using jQuery Functions
Finding Elements
Replacing Data
Working with text
Working with HTML
Working with attributes
Working with form values
Changing Styles
Playing with properties
Using CSS objects
Using CSS classes
Changing the Document Object Model
Adding a node
Removing a node
Playing with Animation

Chapter 4 - Reacting to Events with JavaScript and jQuery
Understanding Events
Event-driven programming
Watching the mouse
Listening for keystrokes
Paying attention to the page itself
Focusing on JavaScript and Events
Saying hello and goodbye
Listening for mouse events
Listening for keystrokes
Event listeners
Looking at jQuery and Events
jQuery event functions
The jQuery event handler

Chapter 5 - Troubleshooting JavaScript Programs
Identfying Errors
Working with Browser Developer Tools
The DOM Explorer
The Console
The Debugger
Working Around Errors

Book IV - PHP

Chapter 1 - Understanding PHP Basics
Seeing the Benefits of PHP
A centralized programming language
Centralized data management
Understanding How to Use PHP
Embedding PHP code
Identifying PHP pages
Displaying output
Handling new-line characters
Working with PHP Variables
Declaring variables
Seeing which data types PHP supports
Grouping data values with array variables
Using PHP Operators
Arithmetic operators
Arithmetic shortcuts
Boolean operators
String operators
Including Files
The include() function
The require() function

Chapter 2 - PHP Flow Control
Using Logic Control
The if statement
The else statement
The elseif statement
The switch statement
The while family
The for statement
The foreach statement
Building Your Own Functions
Working with Event-Driven PHP
Working with links
Processing form data

Chapter 3 - PHP Libraries
How PHP Uses Libraries
Exploring PHP extensions
Examining the PHP extensions
Including extensions
Adding additional extensions
Text Functions
Altering string values
Splitting strings
Testing string values
Searching strings
Math Functions
Number theory
Calculating logs and exponents
Working the angles
Hyperbolic functions
Tracking statistics
Date and Time Functions
Generating dates
Using timestamps
Calculating dates
Image-Handling Functions

Chapter 4 - Considering PHP Security
Exploring PHP Vulnerabilities
Cross-site scripting
Data spoofing
Invalid data
Unauthorized file access
PHP Vulnerability Solutions
Sanitizing data
Validating data

Chapter 5 - Object-Oriented PHP Programming
Understanding the Basics of Object-Oriented Programming
Defining a class
Creating an object instance
Using Magic Class Methods
Defining mutator magic methods
Defining accessor magic methods
The constructor
The destructor
Copying objects
Displaying objects
Loading Classes
Extending Classes

Chapter 6 - Using Sessions and Carts
Storing Peristent Data
The purpose of HTTP cookies
Types of cookies
The anatomy of a cookie
Cookie rules
PHP and Cookies
Setting cookies
Reading cookies
Modfying and deleting cookies
PHP and Sessions
Starting a session
Storing and retrieving session data
Removing session data
Shopping Carts
Creating a cart
Placing items in the cart
Retrieving items from a cart
Removing items from a cart
Putting it all together

Book V - MySQL

Chapter 1 - Introducing MySQL
Seeing the Purpose of a Database
How databases work
Relational databases
Database data types
Data constraints
Structured Query Language
Presenting MySQL
MySQL features
Storage engines
Data permissions
Advanced MySQL Features
Handling transactions
Making sure your database is ACID compliant
Examining the views
Working with stored procedures
Pulling triggers
Working with blobs

Chapter 2 - Administering MySQL
MySQL Administration Tools
Working from the command line
Using MySQL Workbench
Using the phpMyAdmin tool
Managing User Accounts
Creating a user account
Managing user privileges

Chapter 3 - Designing and Building a Database
Managing Your Data
The first normal form
The second normal form
The third normal form
Creating Databases
Using the MySQL command line
Using MySQL Workbench
Using phpMyAdmin
Building Tables
Working with tables using the command-line interface
Working with tables using Workbench
Working with tables in phpMyAdmin

Chapter 4 - Using the Database
Working with Data
The MySQL command-line interface
The MySQL Workbench tool
The phpMyAdmin tool
Searching for Data
The basic SELECT format
More advanced queries
Playing it Safe with Data
Performing data backups
Restoring your data

Chapter 5 - Communicating with the Database from PHP Scripts
Database Support in PHP
Using the mysqli Library
Connecting to the database
Closing the connection
Submitting queries
Retrieving data
Being prepared
Checking for errors
Miscellaneous functions
Putting It All Together

Book VI - Creating Object-Oriented Programs

Chapter 1 - Designing an Object-Oriented Application
Determining Application Requirements
Creating the Application Database
Designing the database
Creating the database
Designing the Application Objects
Designing the objects
Coding the objects in PHP
Designing the Application Layout
Designing the web page layout
The AuctionHelper page layout
Coding the Website Layout
Creating the web page template
Creating the support files

Chapter 2 - Implementing an Object-Oriented Application
Working with Events
Bidder Object Events
Listing bidders
Adding a new bidder
Searching for a bidder
Item Object Events
Listing items
Adding a new item
Searching for an item
Logging Out of a Web Application
Testing Web Applications

Chapter 3 - Adding AJAX
Getting to Know AJAX
Communicating Using JavaScript
Considering XMLHttpRequest class methods
Considering XMLHttpRequest class properties
Trying out AJAX
Using the jQuery AJAX Library
The jQuery $.ajax() function
The jQuery $.get() function
Transferring Data in AJAX
Looking at the XML standard
Using XML in PHP
Using XML in JavaScript
Modifying the AuctionHelper Application

Chapter 4 - Extending WordPress
Getting Acquainted with WordPress
What WordPress can do for you
How to run WordPress
Parts of a WordPress website
Installing WordPress
Downloading the WordPress software
Creating the database objects
Configuring WordPress
Examining the Dashboard
Using WordPress
Exploring the World of Plugins
WordPress APIs
Working with plugins and widgets
Creating Your Own Widget
Coding the widget
Activating the widget plugin
Adding the widget

Book VII - Using PHP Frameworks

Chapter 1 - The MVC Method
Getting Acquainted with MVC
Exploring the MVC method
Digging into the MVC components
Communicating in MVC
Comparing MVC to Other Web Models
The MVP method
The MVVM method
Seeing How MVC Fits into N-Tier Theory
Implementing MVC

Chapter 2 - Selecting a Framework
Getting to Know PHP Frameworks
Convention over configuration
Helper methods
Form validation
Support for mobile devices
Unit testing
Knowing Why You Should Use a Framework
Focusing on Popular PHP Frameworks
Zend Frameworks
Looking At Micro Frameworks

Chapter 3 - Creating an Application Using Frameworks
Building the Template
Initializing the application
Exploring the files and folders
Defining the database environment
Creating an Application Scaffold
Adding a new feature link
Creating the controller code
Modifying the model code
Painting a view


No comments posted yet. Add a comment

Useful Web sites:


Here's where I keep up to date on the latest Linux distribution news.

The most popular desktop Linux distribution.

A popular full-featured Linux distribution, great for both desktops and servers.

A popular Linux server distribution.

Web Programming

PHP online manual
The ultimate resource in all PHP programming topics

MySQL online manual
The MySQL database online manual.

A great online tutorial and reference for many Web programming languages.

Bass Guitar

Fender basses
One of my favorites, I love the Fender Jazz bass. It's such a versatile instrument you can take it to just about any gig!

Lakland basses
The Lakland Skyline 55-01 bass is yet another of my favorite basses!

Bible Study

Reformed Theological Seminary
When I'm not reading computer books, I'm doing bible studies. The Reformed Theological Seminary has some great online courses for free that cover the basics of reformed theology.
A smorgasbord of more reformed and evangelical seminary course recordings, all for free!