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 trialMegan Weber
28,554 PointsCreating a Database
How can I create my own .db file and insert data into it with PHP?
1 Answer
jungkeekim
Courses Plus Student 2,333 PointsFirst of all, you need to choose and install the DB application like MYSQL, Oracle or etc. Then, you declare two the String variables in PHP. One is for the insert statement(query) and one for the date you want to insert. Then it will be sent to your database. I can't tell you all the details but this is how it works. If you have any further question, please ask me.
satria saefudin
497 Pointssatria saefudin
497 PointsYes, I felt there was a "missing link" from previous lessons (https://teamtreehouse.com/library/build-a-basic-php-website). database.db file came out of nowhere? +1 for this question.