Inserting Data in MySQL
Inserting Data in MySQL
In MySQL, the INSERT INTO statement is used to add new records to a MySQL table. The string values inside the SQL query must be quoted and the numeric values along with the NULL should not be quoted when used in a PHP script.
Let's assume we want to add a new Employee to the Employees Table we created in the previous tutorial.
We will use the following syntax:
Now, let's see the PHP Script which inserts a new record to the database: