Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ashley Crossland
10,868 PointsForm Questionnaire/Survey
Could somebody advise me on what tutorials I should be watching:
I currently have a HTML form (containing mostly radio button questions).
I would like to know the best solution of how to store the answers given by the user. Ideally this would not be sent as an email, but stored in a database which can be accessed by my client.
Thank you in advance.
3 Answers
John Steer-Fowler
Courses Plus Student 11,734 PointsHi again Ashley,
Yes, this is possible, although a little more complicated. I will try to make it simple and not confuse you. This would still required PHP and MySQL.
- To insert data from your Survey form into the database your would use the MySQL method:
INSERT INTO; - To retrieve data from the database to feedback to your clients you would use the MySQL method:
SELECT * FROM; - To allow clients to only be able to see their data, you will most likely want to have a login system (PHP driven), PHP sessions (google this) and only query their specific data from the database.
Once you have a good understanding of how PHP and MySQL work then this should be pretty straightforward for you :D
Treehouse teaches all these skills in their creating a simple PHP application tutorials.
Hope this helps
John Steer-Fowler
Courses Plus Student 11,734 PointsHi Ashley,
For this, you would need to learn PHP and MySQL, both of which are taught on Treehouse.
PHP will work with the HTML form to collect the data and send the email and MySQL will send this information to the database and store it there.
Hope this helps, I kept it nice and brief, if you need more detail I will provide it :D
Ashley Crossland
10,868 PointsThanks for your quick response, and I only needed a brief answer to get me started so thanks.
Once it is in the database - can I then call the the answers to be displayed onto a webpage for my client to easily see?