Saving Form Submissions in an External MySQL Database
1.- Create a database: ‘test‘. You can do this with your favorite software, such as phpMyAdmin or also using the following MySQL command:
2.- Create a database table: ‘subscribers‘, with 4 fields: id, name, email and ip_address. You can run the following MySQL query:
3.- Setup the information to your database: ‘test’. The saveToDB.php file allows you to configure the following parameters:
4.- Upload the saveToDB.php file to your server.
5.- Finally go to our contact form and submit the WebHook URL:
- The URL will be http://yourdomainURL.com/saveToDB.php.
From now on, each time you submit the form, the data will be forwarded to your saveToDB.php file that will store the information in the corresponding field in the database.
As you can see in the saveToDB.php file:
- We are receiving $_POST data sent by Easy Forms when a Form is submitted. For example:
Here | text_0 | is the Field name. You can see the name of each field in the Form Builder (Code tab). (see example below.)
And that’s all!
Then you can follow this logic to create your own custom file in order to receive Form Submissions and save them in your database.