Use form to interact with my database

  • mjumper23
    Asked on June 12, 2017 at 7:13 PM

    I have a few questions:

    1) How can I return the results from the user's form submission to use in my database. Do I have to parse the email or is there a way that I can easily pull the variables?

    2) How can I input values from my database to run a conditional check.

    Ex: When the user submits a form it will be dated and have a receipt number. I want to do a conditional check to see if there are any other duplicate receipt numbers from the same day. If so, send error message to user. Otherwise, continue.

    Ex: When they submit they will enter a referral code. If it exists in my database then continue. Otherwise, send error message to user.

  • Chriistian Jotform Support
    Replied on June 12, 2017 at 9:21 PM

    1) How can I return the results from the user's form submission to use in my database? Do I have to parse the email or is there a way that I can easily pull the variables?

    Please note that Form submissions are being delivered to JotForm servers. If you want to save the Form submissions to your own database, you may take a look at this guide that will help you on How to send Submissions to Your MySQL Database Using PHP.

     

    2) How can I input values from my database to run a conditional check?

    I'm afraid to say that this is not possible. Alternatively, you can set up conditions on your form by adding Conditional Logic. Here's the guide on Smart Forms Using Conditional Logic.

    Hope this information helps. 

    Let us know if you need further assistance.
    Regards.