Can i export to a data base in mysql?
- skidzzAsked on March 22, 2011 at 06:42 AM
- JotForm SupportliyamAnswered on March 22, 2011 at 08:04 AM
Hello,
It is possible.
Manually, you can download your CSV report and export it to your MySQL database.
If you want a process done for every submission, you will have to create your own script to do an SQL insert to your database. Of course, you will need your own Thank You page outside jotform to do the SQL insert query.
To do this, you will have to set your JotForm to do post action after submission in the options. This will post all data going to your custom URL Thank You page.
How to set your form to do sending post data:
1. Edit your form and click on Setup & Embed tab
2. Click on Preferences and a pop-up will appear
3. Once the pop-up appears, click on Advanced Settings, you will see on Send Post Data is set to 'No'. Click on 'No' and it will change to a drop down.
4. Select Yes then save it by clicking the Green 'Close Settings' button.
You're done with configuring your form!
Now we setup the Custom URL Thank You page.
1. Click the Thank You link on top
2.A thank you page wizard will appear, select the Custom URL option and click the Next button
3. Enter the URL of your site to which will represent as your Thank you page with an SQL insert query
How to know the data being sent to your Thank you page:
<?php
print_r($_POST);
?>or
<?php
var_dump($_POST);
?>This way you will be able to see the variables related to the values passed. Now you can use those variables to insert your query inside your thankyou page going to your database.
- allanftdAnswered on March 22, 2011 at 08:43 AM
Hi skidzz,
The amazing thing about JotForm is that you can perform one task in many ways. It's up to you to choose which one will work best for you.
The above suggestion by liyam is excellent. An alternative option for you is to export the submissions data found in the Submissions Page into an Excel file. Then import this Excel file into your mysql database.
Here's the location of the Export to Excel icon in your submissions page:
We hope these options will be useful for you. Thank you for using JotForm!
JOTFORM SUPPORT
- lshad24Answered on November 08, 2011 at 11:43 AM
I am reading this solution with great interest but need a little more clarification. I have a database that I use for scheduling appointments. When an appointment is made, I send a confirmation to the student with the url to a form that the student needs to complete prior to the appointment. It would be great if after the student completes and submits the form, the form data (pdf preferably) could be added to my database so that when the tutor sees the appointment, the pdf (containing student data) is available.
Possible?
- fxrAnswered on November 08, 2011 at 06:03 PM
Its not possible to update a mysql database automatically from a JotForm form submission.
But you could write some PHP making use Form Post Data in a Thankyou Page with a Custom URL.
You may find this guide of some use -> http://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page
I added an example of how to the Forms Post Data in one of the replies to the comments near the bottom.
I see my colleague liyamhas also explained how to use Form Post Data in his comments above
Posting to a mysql database with PHP isnt a million miles away from that, but would need a little bit of work on your part.
If your Custom URL lives on the same web server as your Mysql database, connecting to it with php would be as simple as something like this:
The insert would look something like this:
Most of the components you need are in that guide and those little snippets of PHP above.
I may at some point in the future create a user guide entry in how to insert data from JotForms form submission into a mysql database. I was just thinking about this earlier today as it happens.
- lshad24Answered on November 09, 2011 at 10:31 AM
I look forward to seeing theis user guide entry. Thanks, fxr
- fxrAnswered on November 09, 2011 at 04:36 PM
You'll be amongst the first to know when its done, Ishad.
- fxrAnswered on November 10, 2011 at 07:50 AM
Liyam has put together a nice guide for us on posting JotForm data into a Mysql database, which should be some use to you, Ishad24.
- khrisellAnswered on July 04, 2013 at 07:14 PMGreetings!We are happy to announce that we have released Jotform Webhooks, this feature would replace Send Post Data + Custom URL Thank You Page workaround in order to help you transfer forms data to your own database using your own script codes.