First up there are three examples for inserting records into a MySQL database, one for each of the three following techniques:
- Using mysqli in a procedural manner.
- Using mysqli in an object-oriented fashion.
- Using PDO.
After that there is an example of the same three approaches, but with the addition of using prepared statements for improved security and efficiency.