EDITIONS REMYLENT     REMYLENT@GMAIL.COM

Back

Getting started with PHP & MySQL

Chapter 1 : Fundamentals

1.1 Where to find information about PHP ?

1.2 Simulating a local server on your computer

1.3 The text editor and the local server

1.4 How do I write PHP ?

1.5 Comments and escape characters

1.6 The MySQL database

1.6.1 The design of the tables

1.6.2 Creating the database and the table

1.6.3 An example with PHP and a database

Chapter 2 : Variables, structures and functions

2.1 Variables

2.1.1 String handling

2.1.2 Value or alias

2.1.3 Operators to compare

2.1.4 Handling dates

2.1.5 Comparing two dates

2.1.6 Testing the validity of a date

2.1.7 Retrieving date components

2.2 Control structures

2.2.1 Conditional structures

if

if...else 

if...elseif...else 

switch

2.2.2 The ternary condition

2.2.3 Testing NULL values

2.2.4 Loops

while

do...while

for

foreach

2.3 Arrays

2.3.1 A one-dimensional array

2.3.2 An associative array with indices

2.3.3 Foreach reads an associative array

2.3.4 Multi-dimensional array

2.4 Functions

2.4.1 Creating your own functions

2.4.2 Invoking a function with include or require

2.4.3 The scope of variables in a function

Chapter 3 : Answering a form

3.1 Creating a form

3.1.1 The form elements

3.1.2 The <input> tag

A very simple form

A form with an enhanced presentation

3.1.3 Submitting the form with POST or GET

3.1.4 Superglobal variables

3.1.5 Retrieving data from a form

3.1.6 Checking values from superglobals

3.1.7 A function with parameter

3.2 Regular expressions

Chapter 4 : The MySQL database

4.1 The PhpMyAdmin administration tool

4.1.1 Consistency of data

4.1.2 Relationships

4.1.3 Creating a database

4.1.4 Creating a table

4.1.5 Adding information in the table

4.1.6 Browse the data in the table

4.2 The SQL language

4.2.1 Language structure

4.2.2 The SQL syntax

4.2.3 Computing with SQL

4.2.4 Sorting

4.2.5 Grouping

4.2.6 Modifying records with UPDATE and DELETE

4.3 Connecting a database with PHP

4.3.1 Two different APIs

Connection to the server with MySQLi API

Connection to the with PDO API

4.3.2 Querying a table using the MySQLi template

4.3.3 Some MySQli functions

4.3.4 Inserting data with INSERT INTO and MySQLi

4.3.5 Inserting data with INSERT INTO and PDO API

4.3.6 The main PDO functions

4.4 From a form to a database

4.4.1 Adding data

4.4.2 Searching data

4.4.3 Using a drop-down list

4.4.4 MySQLi functions with SQL query

Example 1 : Displaying query columns

Example 2 : Resultset, rows and columns

4.5 PDO object-oriented programming

4.5.1 Connection to the server

4.5.2 Sending a request to the server

4.6 Handling files with PHP

4.6.1 A form used to upload a file 

4.6.2 Processing the uploaded file