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

Databases

Ila Gupta
Ila Gupta
5,147 Points

How to connect live website to database?

I made a website and I want form which is available on the website to connect with database. So whenever user inputs any data it stores in database. I have not much knowledge with backend, but have learnt few queries of mySql using Xampp. What are the possible ways to do it and are there any tutorials for the same? Thanks in advance!

1 Answer

jason chan
jason chan
31,009 Points

https://teamtreehouse.com/library/using-php-with-mysql

This is for php though. This is one way. But it's going to be similar with rails too.

Ila Gupta
Ila Gupta
5,147 Points

Thanks for the video! But what are the ways apart from php? Also I tried using Xampp but have doubt. If I create localhost through Xampp data gets stored in phpmyadmin but I dont know if that works for another user filling the form on the website. As I guess it includes localhost which creates a local server. Any suggestions?