How to Insert Value Into Database in PHP – Info PHP
This article explains how to insert value into a database in PHP. The following methods are used:
In this example, we implement the insertion of a value into a database in PHP. There are certain steps to follow as explained below.
Create a database with the name demo as shown below.
Now create a table named in_ch with fields in the table like name, address, city and contactnumber as shown below.
Now create a file index.php in your text editor and save it inside the www folder (localhost) and write the following code as shown below.
Now open the index.php file in your local server as shown below.
Now fill in the form. Click on the submit button and it will show the confirmation message.
Check the following values in the database:
Article Prepared by Ollala Corp