Chapter 4. Connection with Database

In the earlier chapters, we learned about forms, such as what forms are, how we can validate them, and how we can improve the look and feel of them, but what is the use of forms until they store information? In this chapter, we will learn how to store the user's input data into a database using PHP and MySQL.

In this chapter, we will cover the following topics:

  • What is PHP
  • What is MySQL
  • Spoofing and forging forms
  • Linking of forms to the database


PHP, which is also used as a general-purpose programming language, is basically a server-side scripting language, which is designed for web development. With a PHP processor module, PHP code is interpreted by a web server resulting in the generation of a web page.

Rather ...

Get Mastering HTML5 Forms now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.