-
kareemloftersAsked 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 -
sethReplied on April 21, 2017 at 3: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.