Inserting data into a database via mysql is fairly uncomplicated however the most important thing to keep in mind is security. Improperly inserting data via php mysql can result in a mysql injected attack where your database and perhaps your entire website becomes vulnerable and destroyed. With this in mind you want to regularly back up your database and store the backup offsite.
Inserting a new column into a database via php occurs with 3 steps.
To connect to your database via php:
The second step is simplified via 2 function calls and 2 lines of code which are calls to these 2 php function.
Creating the new row for your database via php:
Closing the connection to your database via php:
Use the code struction above to put new data into a database table and inserting new rows into your database using php will be smooth, safe and efficient.