How can I connect my form to a MySql database to store the data collected?

  • Profile Image
    Disquss
    Asked on August 31, 2011 at 10:01 AM

    I created a form for an online survey and successfully embeded it in a HTML + i FRAME setup (using iwipa) on a facebook page. (Below is the url of the form on my domain and I suggest you try filling it then submitting to see the problem first hand). I have created a database on my domain where the data collected by the form is supposed to be stored and attempted to connect them using 'formtools'. However, everytime a submission is made, there is a fatal error

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16 bytes) in /home/outs/public_html/anonypolls/tools/process.php on line 204

    and no data is registered in the database. Obviously, this is frustrating the whole survey. What do you think the problem is/what am I doing wrong? Please get back to me as soon as possible.

  • Profile Image
    mliz
    Answered on August 31, 2011 at 08:51 PM

    Hi there,

    If you wish to collect the form data into your own mysql database you
    can use the Send Post feature of JotForm.

    To see how it works:

    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.

    Send Post is now enabled the next step is to setup the custom url for the
    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

    You can add the following codes in your-file.php to know that the data is
    being sent.

    <?php
    print_r($_POST);
    ?>

    Hope this helps, let us know if you have questions.

    Regards,
    Mliz

  • Profile Image
    khrisell
    Answered on July 04, 2013 at 11:01 PM
    Greetings!

    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.

    To know more about Jotform Webhooks, please click here.

     

    Thank you for using JotForm. :)