Send my form data to an MS sql database?

  • breathefunerals
    Asked on September 19, 2017 at 6:44 AM

    Hi I hope you can help. I am looking to create a form for my clients landing page which I can then have the data sent straight to their My SQL database is this possible with one of the apps and if so do you have any tutorials??

    Many thanks for your help

    Lydia

  • Sabbir
    Replied on September 19, 2017 at 8:27 AM

    Hello, you can do this by following some steps

    1. You have to enable the Send Post Data to your thank you page once the user submit the form.

    Settings->Form Settings->Show More Options->Send Post Data

    Refer to this image

    Send my form data to an MS sql database? Image 1 Screenshot 20

    Set this to 'Yes'

    2. Now in your thank you page, you can grab all the data posted through your form. To access this data in PHP:

    <?php

    print_r( $_POST );  

    ?>

    you will see something like this

    Array
    (
        [submission_id] => 186725738203177939
        [formID] => 11814245193
        [ip] => 203.177.93.98
        [name] => sample name test data
        [email] => email@gmail.com
        [phonenumber13] => Array
            (
                [0] => 3343
                [1] => 4234
            )

        [subject7] => Technical Support assistance
        [message6] => test
    )

    Now you can send these data to your Mysql table using standard mysql query.

    If you want more assistance on this, please let us know.

    Thanks

     

  • eezgikrtl
    Replied on September 19, 2017 at 8:37 AM

    It is possible to sending data straight to My SQL database.

    You can connect your form to a MySQL database using PHP. You need to have knowledge in PHP programming for that. Please check this guide: How to send Submissions to your MySQL Database using PHP

    You might also want to check JotForm Webhooks. Please check this blog post: Send-Instant-Submission-Notifications-with-Webhooks. You can find Webhooks example on this guide: Webhook-PHP-Script-Examples

    Hope that helps. If you have any questions, let us know. Thank you.

  • breathefunerals
    Replied on September 19, 2017 at 8:50 AM

    That's brilliant thank you.

    One problem may be though that the form needs to be a 2 page form. Page 1= basic name etc, page 2= further questions and tick boxes.

    We need to be able to capture and send the first page details even if they don't fill out the page 2 form details. Will that be possible though if the data is not sent until the Thank You page?

  • aubreybourke
    Replied on September 19, 2017 at 10:50 AM

    Yes exactly, the server side script cannot process the data until submission, when the data is sent.