JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
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.
How can I create a form to query a mysql database?Asked by dustinvz on January 27, 2012 at 03:54 AM
I have a lit of members in a MySql database on my website.
I need to create a form where users can input their email adress to check if they are on the member database,
any idea how I could do this?
Please visit the following article from our User Guide for information on how to query a database using JotForm.
How to Insert or update form submissions to your MySQL database using PHP
Hope this helps, if you have further questions feel free to ask.
I need to get a query result from the form, not inject the data into a database.
Sent from my iPhone
You would need to use a Custom URL as a thankyou page which opens and checks against an entered email address when the user hits the submit button.
The php should be relatively straightforward.
You would need to enable Sending of Post Variables from your form, and then work out the variable name for the email field.
This guide should help you with that.
This a basic section of php code which should provide this functionality. -> http://pastie.org/3263233 Save that to your webserver as checkemail.php (or whatever) then point JotForm at that as your Custom URL thankyou page.
I have written that code off the top of my head and is untested, but it should work, I have put comments in sections you need to edit to suit your database.
That should at least get you started..
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. :)