Form Builder, php, and mySql

Issues related to forms.
Post Reply
edempco
Posts: 8
Joined: Fri Jan 03, 2014 11:30 pm

Form Builder, php, and mySql

Post by edempco » Tue Jan 07, 2014 5:23 pm

I'm new to QnE and have built my first form. I have tried to access an existing table in a database, and create a new table. Neither seem to work. I have also tried to have the form send email and store a CSV file. None of these options works. When the submit button is clicked, a blank page is presented, even though it should be redirected back to the same page. At the present, I am trying to determine if the hosting site is a problem. I am using Yahoo.hosts. From their website, I have determined that they are specific about using "mysql" as the hostname (instead of "localhost"). I have two questions:
1. Has anyone had difficulty with Yahoo.hosts?
2. Is there a process to test the form connection to the database table?

P.S. Database and table can be accessed by phpMyAdmin, but only through Yahoo.hosts. They restrict outside access to databases.
P.P.S The page can be viewed by going to: http://evartcarclub.com/Membership.php

User avatar
Pablo
Site Admin
Posts: 2646
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form Builder, php, and mySql

Post by Pablo » Tue Jan 07, 2014 6:19 pm

I recommend to start with the basics (so simple form). Trying to do it all at the same time, will make it difficult to find the source of the problem.
Once you have the basics working you can move to the next stage (add csv, mysql etc)

To make csv work you need to make sure the file exists on the server and that it has write permissions.

the mysql option requires some knowledge of mysql, unfortunately I cannot help you debug connection problems. but I can ensure you that the code generated by the software is valid, otherwise I had already fixed it of course.

if you get an empty page then that probably means that yahoo has disabled error reporting, which makes it difficult to say anything useful about this behavior.
Please ask them to enable error reporting for php.

edempco
Posts: 8
Joined: Fri Jan 03, 2014 11:30 pm

Re: Form Builder, php, and mySql

Post by edempco » Sat Jan 11, 2014 1:11 am

Thank you for reminding me to go back to the basics. I took your advice and forgot what little I know about php ... which wasn't hard to do. I just had to use it as you intended. By the way, it works flawsly!

I could not find a good set of instructions that suited me, so, I will relate how I used your product. New users may find these steps helpful to produce their first mySql table automatically:
1. Create a webpage and be sure to go to the Property Inspector and change it from HTML to PHP.
2. Plan and build your table carefully placing your table fields in the order you want. The FIRST time you use the program do not try to make changes to the form (NOTE:if you want to make changes, START OVER. Later, you can use the QnE to make changes to a table. What is important here is to let the QnE make the table for you.)
3. Creating the form using the Wizard. While using the form wizard, set:
- Name: (choose a NEW table name, not an existing table)
- Form Action: Submit to a script on an external website
- Success Page: (create a success page, so that you know your form and database works)
- Encoding Type: text/plain
4. Highlight the form and use the Property Inspector to set:
- Enable Form Processor: true
- Success Page: (this was already done in form wizard)
- mySql: true
- Database Name: (your database that is already set up)
- Password: (your database password)
- Server: (your server host name, like: localhost, mysql, etc.)
- Table: (this was already done in the form wizard)
- Username: (your database username)
5. Click on each field of your form and use Property Inspector to set:
- Name: (add or fix the name you would like to see in the new table)
- Validation: (choose to have each field do things, like: require data, validate for email, require a certain number of characters, etc.)
- Title: (enter a pop-up hint or instruction to help with entering the proper field information)
6. Publish the page, so that you can use the form online (it will not work while in QnE).
7. Fill in ALL of the fields of your form the first time you use it, so that the entire table can be build from the form. Press the "Send" button and the new table will be built in your mySql database! If you see your Success Page, you will know the form worked and the table was built. Check your database for the new table.

For a beginnner, it's just like the program ... Quick N Easy!
Because I'm a first-timer, there are probably settings I made that were not necessary, but they worked for me. Feel free to correct me.

User avatar
Pablo
Site Admin
Posts: 2646
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form Builder, php, and mySql

Post by Pablo » Sat Jan 11, 2014 7:22 am

Thanks for sharing your instructions, this may be useful for other users!

sunny
Posts: 4
Joined: Wed Dec 07, 2016 7:22 am

Re: Form Builder, php, and mySql

Post by sunny » Wed Jun 28, 2017 5:52 pm

Thanks a lot for taking the trouble.
Your instructions worked for me too and cleared up a number of mistakes I was doing.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest