Tenth Assignment | Introduction to JavaScript and Web Design

This week we focused a lot more on connecting our SQL database to PHP. Last week we learned the basics of creating a table, fields, and manually inserting data into our table from the admin page. This week we learned about using a database connection with our databases information to connect to it remotely with PHP. We learned about two different ways to connect, one is specifically designed for MySQL and the other is for generally connecting to most databases.

We can create a query by creating an SQL statement jut as a PHP string, then passing into into the connector object’s query method. The query will return a boolean based on if the SQL was properly evaluated.

Overall this module was definitely a step up in difficulty, connecting to a database and using raw SQL can be very tedious. With that being said though we learned a lot this week and this is a huge step towards making highly interactive and complex PHP applications!