eBook-Daraz

A place for all eBooks

This site lists free eBooks and online books related to programming, computer science, software engineering, web design, mobile app development, networking, databases, information technology, AI, graphics and computer hardware which are provided by publishers or authors on their websites legally. We do not host pirated books or we do not link to sites that host pirated books.

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

 

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
PART I
GETTING STARTED. . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1 Installing and Configuring MySQL. . . . . . . . . . . . . . . . 3
Various MySQL Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Installing MySQL on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Testing Your MySQL Installation . . . . . . . . . . . . . . . . . . . . . . . . . 12
Installing MySQL for Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Testing Your MySQL Installation . . . . . . . . . . . . . . . . . . . . . . . . . 20
Chapter 2 Installing Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Installing Apache for Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Configuring Apache on Windows. . . . . . . . . . . . . . . . . . . . . . . . 29
Starting and Connecting to Apache . . . . . . . . . . . . . . . . . . . . . . 31
Installing Apache for Linux/UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Configuring Apache on Linux/UNIX . . . . . . . . . . . . . . . . . . . . . . 34
Starting and Connecting to Apache

Chapter 3 Installing PHP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Installing PHP for Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Configuring Apache to Use PHP. . . . . . . . . . . . . . . . . . . . . . . . . 41
Testing the PHP Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Installing PHP for Linux/UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Configuring Apache to Use PHP. . . . . . . . . . . . . . . . . . . . . . . . . 46
Testing the PHP Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
PART II
THE ABSOLUTE BASICS OF CODING IN PHP . . . . 49
Chapter 4 Mixing PHP and HTML. . . . . . . . . . . . . . . . . . . . . . . . 51
How PHP Is Parsed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
PHP Start and End Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Code Cohabitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
The Importance of the Instruction Terminator . . . . . . . . . . . . . . 57
Escaping Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Commenting Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Chapter 5 Introducing Variables and Operators . . . . . . . . . . . . 65
What’s a Variable? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Naming Your Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
PHP Variable and Value Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
What’s an Operator? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 6 Using PHP Variables . . . . . . . . . . . . . . . . . . . . . . . . . 85
Getting Variables from Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Creating a Calculation Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Creating the Calculation Script. . . . . . . . . . . . . . . . . . . . . . . . . . 89
Submitting Your Form and Getting Results . . . . . . . . . . . . . . . . 91
HTTP Environment Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Retrieving and Using REMOTE_ADDR . . . . . . . . . . . . . . . . . . . . 93
Retrieving and Using HTTP_USER_AGENT . . . . . . . . . . . . . . . . 95
PART III
START WITH THE SIMPLE STUFF . . . . . . . . . . . . . . 97
Chapter 7 Displaying Dynamic Content . . . . . . . . . . . . . . . . . . . 99
Displaying Browser-Specific HTML . . . . . . . . . . . . . . . . . . . . . . . . 100
Displaying Platform-Specific HTML. . . . . . . . . . . . . . . . . . . . . . . . 103
Working with String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Creating an Input Form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Creating a Script to Display Form Values . . . . . . . . . . . . . . . . . 109
Submitting Your Form and Getting Results . . . . . . . . . . . . . . . 111
Redirecting to a New Location . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Creating a Redirection Form. . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Creating the Redirection Script and Testing It . . . . . . . . . . . . . 115
Chapter 8 Sending E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Using an SMTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SMTP-Related Changes in php.ini . . . . . . . . . . . . . . . . . . . . . . 119
A Simple Feedback Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Creating the Feedback Form . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Creating a Script to Mail Your Form . . . . . . . . . . . . . . . . . . . . . 122
Submitting Your Form and Getting Results

A Feedback Form with Custom Error Messages . . . . . . . . . . . . . 127
Creating the Initial Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Adding Error Checking to the Script . . . . . . . . . . . . . . . . . . . . 129
Submitting Your Form and Getting Results . . . . . . . . . . . . . . . 134
Saving the Values if You Make an Error . . . . . . . . . . . . . . . . . . 136
Chapter 9 Using Your File System . . . . . . . . . . . . . . . . . . . . . . 139
File Paths and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Displaying Directory Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Working with fopen() and fclose() . . . . . . . . . . . . . . . . . . . . . . . . . 143
Creating a New File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Appending Data to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Reading Data from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Sending File Contents via E-Mail . . . . . . . . . . . . . . . . . . . . . . . 155
File System Housekeeping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Copying Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Renaming Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Deleting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Chapter 10 Uploading Files to Your Web Site . . . . . . . . . . . . . . 165
Checking Your php.ini File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Understanding the Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Creating the Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Creating the Upload Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Uploading a File Using Your Form and Script. . . . . . . . . . . . . . . . 172

PART IV
GETTING TO KNOW YOUR MYSQL
DATABASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Chapter 11 Establishing a Connection and Poking Around . . . . 177
Working with User Privileges in MySQL . . . . . . . . . . . . . . . . . . . . 178
Creating a New User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Connecting to MySQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Breaking Your Connection Script . . . . . . . . . . . . . . . . . . . . . . . 182
Listing Databases on a Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Listing Tables in a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Creating a New Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Deleting a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Chapter 12 Creating a Database Table. . . . . . . . . . . . . . . . . . . . 197
Planning for Your Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Basic MySQL Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Defining Your Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
The Importance of Unique Fields . . . . . . . . . . . . . . . . . . . . . . . 201
A Two-Step Form Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Step 1: Number of Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Step 2: Defining Your Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Starting the Table Creation Process . . . . . . . . . . . . . . . . . . . . . 208
Creating the Table-Creation Script . . . . . . . . . . . . . . . . . . . . . . . . 210
Create That Table! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

PHP 6 FAST & EASY WEB DEVELOPMENT Julie Meloni | Matt Telles Free Downlad PDF

1 Comment

Add a Comment
  1. Greak Work

     

Leave a Reply

Your email address will not be published. Required fields are marked *

eBook-Daraz © 2017 Frontier Theme