Essential PHP fast: Building Dynamic Web Sites With Mysql

Front Cover
Springer Science & Business Media, Jun 28, 2002 - Computers - 249 pages
How to create dynamic web environments using the PHP language and the MySQL database!
If you are familiar with the syntax for C, C++ and Java, then PHP will seem very familiar. Once you have got up to speed with this HTML embedded scripting language, you will soon be creating dynamic HTML database-enabled web pages quickly and easily.
This quick and practical introduction explains:
- how PHP works and what a dynamic web page is;
- the software development environment;
- the syntax and features of the language;
- how PHP can be integrated with MySQL databases;
- dynamic database applications.
Clearly written, this book provides you with all the essential information you need to create your own dynamic web environments using PHP.
Additional material is available from the Essential series web site: http://www.essential-series.com
 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Selected pages

Contents

Introduction
2
Is this Book for You?
3
How to Use this Book
4
Creating a Typical PHP Development Environment
7
Introduction
8
Web Server
10
PHP
15
Database
16
MultiDimensional Arrays
121
Arrays and the foreach Loop
125
Strings and Arrays
126
Combination Arrays
127
Manipulating Arrays at Run Time
129
Summary
131
The MySQL Database
133
Introduction
134

Introduction
18
First PHP Script
19
The History of PHP
22
How Is PHP Different?
23
Formatting PHP Instructions
25
Echo and Print Statements
26
Comment Statements
27
Summary
28
Variables Integer and FloatingPoint Data Types
31
Introduction
32
Assigning a Variable by Value
33
Assigning a Variable by Reference
34
Different Types of Variables
36
Integers
37
FloatingPoint Numbers
39
Summary
41
Introduction
44
Double Quoted Strings
45
Variables in Strings
46
Joining Strings
47
Referencing Characters in a String
48
String Length
50
Converting Strings
51
Summary
53
Accessing Environment and PHP Variables
55
Introduction
56
Environment Variables
57
PHP Variables
60
Summary
61
Investigating Expressions Operands and Operators
63
Introduction
64
Expressions
65
Operators
66
Arithmetic Operators
67
The Assignment Operator
68
Bit Manipulation Operators
70
Comparison Operators
73
Increment and Decrement Operators
74
Logical Operators
76
Operator Precedence
77
Summary
79
Controlling the Flow of Control
81
Introduction
82
The if Statement
84
The else Statement
85
The elseif Statement
87
The while Loop
88
The do while Loop
90
The for Loop
91
Nested Loops
94
Breaking Out of Loops
96
The continue Statement
97
The switch Statement
98
Summary
101
Interacting with the User
103
Introduction
104
GET and POST Methods
107
Retaining Form Field Data
110
Interacting with a PHP Application
113
Summary
115
Introduction
118
Starting the Database
135
Creating a Database
136
Dropping a Database
139
Hiding the WinMySQLadmin Application
140
Selecting a MySQL Database
142
Creating Database Tables from a Dump File
145
Dropping MySQL Databases and Tables
147
Accessing MySQL Databases Using PHP
149
Introduction
150
Accessing Multiple Records by Record Number
153
Accessing Multiple Records by Column Name
154
Checking for the Existence of Records
156
Searching for Specific Records
157
Using Hyperlinks to Select Records
159
Using a Form to Select Records
161
Using a Form to Search on Different Fields
163
Adding Records
166
Deleting Records
169
Updating Records
171
Summary
173
Implementing Functions
175
Introduction
176
A Simple Function
177
Using Arguments
180
Functions with Multiple Parameters
182
Functions and Local Variables
184
Arguments Passed by Value
185
Arguments Passed by Reference
186
Default Argument Values
188
Returning a Value from a Function
189
Function Calls Within Functions
192
Summary
194
Cookies
195
Introduction
196
Viewing a Cookie
198
Deleting a Cookie
199
Summary
201
Introduction
204
Closing a File
205
Reading Characters from a File
206
End of File Function
209
Reading a Remote File
211
Writing to a File
213
Summary
214
Introduction
216
A Simple Class
217
Accessing an Objects Variables
220
Multiple Objects of a Class
222
Constructors
224
Arrays of Objects
225
Objects in Objects
226
Inheritance
230
Summary
233
Further Information Resources
235
Introduction
236
The PHP Online Manual and FAQ
237
The MySQL Manual
238
MySQL Online Manual and FAQ
239
Other Online Resources
240
And Finally
241
Copyright

Other editions - View all

Common terms and phrases

Bibliographic information