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
rocaelchavarria
7,067 PointsHow to capture form information?
I know this might be a stupid question, but I haven't figured it out even with the classes nor do I see anywhere that talks about it.
When I create a form on my website, how do I get it to save the information that customers put into form? By that I mean how do I link it to save into my MySQL database, or how do companies do such things?
Thank you for any help at all! I love these forums, so many helpful ladies, gents, and instructors.
-Rocky
4 Answers
Stone Preston
42,016 Pointswell, in php, form data is stored in the $_POST array. so whenever a form is submitted, the data that was in the input field named "first_name", for example, can be accessed in $_POST["first_name"]. You should check out the php tutorials. There are several projects and I think there is a PHP and MySQL project as well
James Barnett
39,199 PointsCheck out the Become a PHP Developer track, it starts teaching you about PHP, then about Databases and finally how to bring them together.
Wayne Priestley
19,579 PointsMy hosting provider provides a app that links between my database and my form, its a simple install.
It might be a good idea to check if you provider does the same.
rocaelchavarria
7,067 PointsThank you all for the help, I will look into the videos and the app!