PHP and MySQL Foundations
Connect PHP securely to MySQL and implement validated create, read, filter and update operations with PDO.
Connecting PHP to MySQL
A database connection allows PHP to send SQL to MySQL and receive results. Keep the connection in...
Using Prepared Statements
Prepared statements keep user-supplied values separate from SQL instructions. Use them whenever a...
Inserting Validated Form Data
An insert should accept input, validate it, store it with a prepared statement and report a usefu...
Selecting and Displaying Records
A useful output begins with a query and ends with accessible, escaped HTML. Select only required ...
Filtering and Sorting Records
Filters help users reduce a dataset to relevant records. Sorts place those records in a useful or...
Updating Existing Records
An update changes an existing row. The application must identify the row, validate changes and pr...