Save Form Results to a Custom MySQL Database

Every new Formsite form gets its own secure database area where its results are saved. Form results are added to the database and stored securely where the form managers can view and edit them. Occasionally there are times when account owners need to connect forms to a different MySQL database that they control, like with a content management system (CMS).

Our goal is to provide useful and practical features for online forms, and we encourage our advanced customers to customize the system where possible. Sending results to a custom MySQL database is a relatively easy start for using Formsite as your custom data collection and processing system.

Formsite MySQL Results

The Easy Way: Zapier > MySQL

Formsite MySQL ZapierThe Zapier integration allows form owners to connect the form to another service, and Zapier calls that connection a Zap. Formsite Zaps are super useful and allow multiple services to be updated from each result, including scheduling applications, content sharing, file distribution and backups, and tons more.

The MySQL Zap lets form owners send the result through Zapier to the destination MySQL server. Once the data has been sent, the data is inserted into the MySQL database and can be accessed through a virtually infinite number of content management systems, data processing applications, and more.

The MySQL Zap is currently a premium offering from Zapier and you can read about how to connect your form from our Zapier documentation page.

The Other Way: Server Post

Formsite MySQL Server PostThe Server Post integration lets form owners send form submissions to the destination URL, which is frequently a file created to collect the information and insert it into a MySQL database. The basic steps are:

Set up the database. Most hosting accounts come with the ability to set up a MySQL database, so check your hosting features to see how to do that. Once the database is established, it can be accessed through a provided URL and username/password pair.

Write the insert code. Next, the file is made that will collect the form submission and format the data properly so that it can be inserted into the database. This file is the most challenging part of the process and will require knowledge of the back-end language (PHP, Java, Javascript, Ruby, .NET, Python) along with how it works with MySQL.

While creating the destination file, it’s helpful to see the exact data and format that is sent with the submission. Use the following settings on the Integrations -> Server Post page then submit a test response:

Server URL: https://httpbin.org/post
Use server response as Success Page: Yes

Test the Server Post. Once the file is ready for testing, upload it to the destination server and modify the settings on the Integrations -> Server Post page:

Server URL: [the URL for your file]
Use server response as Success Page: No

The database will need to be monitored to see if the values are being inserted correctly and the file modified if necessary.

Billions of forms submitted