PHP SQL Insertion
PHP SQL Insertion is used to execute MySQL queries in PHP script. It is used to send insert query or command that adds the records to MySQL.
Understand with Example
The Tutorial illustrate an example from 'PHP SQL Insertion'. To understand and grasp the example we create a table 'Stu' that create the required fields and datatypes respectively. The Table 'stu' has a Primary Key ID.
Create Table Stu:
The PHP SQL insertion is saved with .php extension. The server side scripting include a local host, user, password and name of the database to which records are added. To execute the queries, the connection would be built between the front-end and MySQL in the backend. Once your connection is built successfully, you can add the records to the database. The die function( ) illustrate that connection could not established and exists from the current script.