What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Hi Can you help me send submissions to my MySQL Database?

    Asked by kareemlofters on April 20, 2017 at 10:29 PM

    Hi,

    I'm trying to follow this guide:

    https://www.jotform.com/help/126-How-to-send-Submissions-to-Your-MySQL-Database-Using-PHP

    Can you walk me through? I've never set something like this up before.

    Thank you,

    Page URL:
    https://form.jotform.ca/71099000911246

  • Profile Image
    JotForm Support

    Answered by seth on April 21, 2017 at 03:55 AM

    Hello,

    We would be very happy to help you out.

    First of all, you should start by doing the post data option from a JotForm. Please follow this guide and see the posted data on your screen.

    https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

     

    Here is the demo form from the guide:

    https://form.jotform.com/62301599849972

     

    You can clone this form and test it on your side:

    https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

     

    After that, you will set up your variables and prevent SQL injection.

    Let me briefly tell you about SQL Injection. If the posted data contains an SQL query like:

     

    exampleValue'INSERT....

     

    then if you don't prevent it with the function "ExtendedAddslash" which is in the guide (https://www.jotform.com/help/126-How-to-send-Submissions-to-Your-MySQL-Database-Using-PHP), the query starts with the INSERT here will trigger. You add slashes to prevent that query by converting it to a string.

     

    Please check out this guide:

    http://php.net/manual/en/function.addslashes.php

     

    After understanding and doing all these, please turn back to us with the results. We will continue where we left.

     

    All the best.