| Introduction | p. 1 |
| Introduction | p. 2 |
| Why PHP and MySQL? | p. 2 |
| Is this Book for You? | p. 3 |
| How to Use this Book | p. 4 |
| Creating a Typical PHP Development Environment | p. 7 |
| Introduction | p. 8 |
| Web Browser | p. 8 |
| Web Server | p. 10 |
| PHP | p. 15 |
| Text Editor | p. 15 |
| Database | p. 16 |
| Summary | p. 16 |
| Introducing PHP | p. 17 |
| Introduction | p. 18 |
| A Simple HTML Document | p. 18 |
| First PHP Script | p. 19 |
| The History of PHP | p. 22 |
| Static and Dynamic Web Pages | p. 22 |
| How Is PHP Different? | p. 23 |
| Formatting PHP Instructions | p. 25 |
| Jumping In and Out of PHP | p. 25 |
| Echo and Print Statements | p. 26 |
| Comment Statements | p. 27 |
| Summary | p. 28 |
| Variables: Integer and Floating-Point Data Types | p. 31 |
| Introduction | p. 32 |
| What Is a Variable? | p. 32 |
| Assigning a Variable by Value | p. 33 |
| Assigning a Variable by Reference | p. 34 |
| Different Types of Variables | p. 36 |
| Integers | p. 37 |
| Floating-Point Numbers | p. 39 |
| Summary | p. 41 |
| Variables: Strings | p. 43 |
| Introduction | p. 44 |
| Single Quoted Strings | p. 44 |
| Double Quoted Strings | p. 45 |
| Variables in Strings | p. 46 |
| Joining Strings | p. 47 |
| Referencing Characters in a String | p. 48 |
| String Length | p. 50 |
| Converting Strings | p. 51 |
| Summary | p. 53 |
| Accessing Environment and PHP variables | p. 55 |
| Introduction | p. 56 |
| Predefined Variables | p. 56 |
| Environment Variables | p. 57 |
| PHP Variables | p. 60 |
| Summary | p. 61 |
| Investigating Expressions, Operands and Operators | p. 63 |
| Introduction | p. 64 |
| Expressions | p. 65 |
| Operators | p. 66 |
| Operands | p. 66 |
| Arithmetic Operators | p. 67 |
| The Assignment Operator | p. 68 |
| Bit Manipulation Operators | p. 70 |
| Comparison Operators | p. 73 |
| The Conditional Operator | p. 73 |
| Increment and Decrement operators | p. 74 |
| Logical Operators | p. 76 |
| Operator Precedence | p. 77 |
| Summary | p. 79 |
| Controlling the Flow of Control | p. 81 |
| Introduction | p. 82 |
| Sequence, Selection and Iteration | p. 82 |
| The if Statement | p. 84 |
| The else Statement | p. 85 |
| The elseif Statement | p. 87 |
| The while Loop | p. 88 |
| The do while Loop | p. 90 |
| The for Loop | p. 91 |
| Nested Loops | p. 94 |
| Breaking Out of Loops | p. 96 |
| The continue Statement | p. 97 |
| The switch Statement | p. 98 |
| Summary | p. 101 |
| Interacting with the User | p. 103 |
| Introduction | p. 104 |
| PHP and Forms | p. 104 |
| Simple Form Processing | p. 104 |
| GET and POST Methods | p. 107 |
| Combining PHP and Forms | p. 107 |
| Retaining Form Field Data | p. 110 |
| Interacting with a PHP Application | p. 113 |
| Summary | p. 115 |
| Arrays | p. 117 |
| Introduction | p. 118 |
| Single-Dimensional Arrays | p. 118 |
| Multi-Dimensional Arrays | p. 121 |
| Arrays and the foreach Loop | p. 125 |
| Strings and Arrays | p. 126 |
| Combination Arrays | p. 127 |
| Manipulating Arrays at Run Time | p. 129 |
| Summary | p. 131 |
| The MySQL Database Management System | p. 133 |
| Introduction | p. 134 |
| What Is MySQL? | p. 134 |
| Starting the Database | p. 135 |
| Creating a Database | p. 136 |
| Dropping a Database | p. 139 |
| Hiding the WinMySQLadmin Application | p. 140 |
| Creating Database Tables | p. 140 |
| Selecting a MySQL Database | p. 142 |
| Creating Database Tables from a Dump File | p. 145 |
| Dropping MySQL Databases and Tables | p. 147 |
| Quitting MySQL | p. 147 |
| Summary | p. 147 |
| Accessing MySQL Databases Using PHP | p. 149 |
| Introduction | p. 150 |
| A Simple PHP Script to Display Database Records | p. 150 |
| Accessing Multiple Records by Record Number | p. 153 |
| Accessing Multiple Records by Column Name | p. 154 |
| Checking for the Existence of Records | p. 156 |
| Searching for Specific Records | p. 157 |
| Using HyperLinks to Select Records | p. 159 |
| Using a Form to Select Records | p. 161 |
| Using a Form to Search on Different Fields | p. 163 |
| Adding Records | p. 166 |
| Deleting Records | p. 169 |
| Updating Records | p. 171 |
| Summary | p. 173 |
| Implementing Functions | p. 175 |
| Introduction | p. 176 |
| Advantages of Functions | p. 176 |
| A Simple Function | p. 177 |
| More Power to Functions: Using Arguments | p. 180 |
| Functions with Multiple Parameters | p. 182 |
| Functions and Local Variables | p. 184 |
| Arguments Passed by Value | p. 185 |
| Arguments Passed by Reference | p. 186 |
| Default Argument Values | p. 188 |
| Returning a Value from a Function | p. 189 |
| Function Calls Within Functions | p. 192 |
| Summary | p. 194 |
| Cookies | p. 195 |
| Introduction | p. 196 |
| Limitations of Cookies | p. 196 |
| Setting a Cookie | p. 196 |
| Viewing a Cookie | p. 198 |
| Deleting a Cookie | p. 199 |
| Using Cookies to Personalize Pages | p. 199 |
| Summary | p. 201 |
| File Handling | p. 203 |
| Introduction | p. 204 |
| Opening a File | p. 204 |
| Closing a File | p. 205 |
| Reading Characters from a File | p. 206 |
| The End of File Function | p. 209 |
| Reading Lines from a File | p. 209 |
| Reading a Remote File | p. 211 |
| Writing to a File | p. 213 |
| Summary | p. 214 |
| Classes and Objects | p. 215 |
| Introduction | p. 216 |
| A Simple Class | p. 217 |
| Accessing an Object's Variables | p. 220 |
| Multiple Objects of a Class | p. 222 |
| Constructors | p. 224 |
| Arrays of Objects | p. 225 |
| Objects in Objects | p. 226 |
| Inheritance | p. 230 |
| Summary | p. 233 |
| Further Information Resources | p. 235 |
| Introduction | p. 236 |
| The PHP Manual | p. 236 |
| The PHP Online Manual and FAQ | p. 237 |
| The MySQL Manual | p. 238 |
| The MySQL Online Manual and FAQ | p. 239 |
| Other Online Resources | p. 240 |
| And Finally | p. 241 |
| Index | p. 243 |
| Table of Contents provided by Publisher. All Rights Reserved. |