From the course: PHP for Web Designers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Loading data into MySQL - PHP Tutorial
From the course: PHP for Web Designers
Loading data into MySQL
The ability to connect to a database and display the results is probably one of the most compelling reasons for learning PHP. And working with the database is what this chapter is all about. Throughout the chapter we'll be working with the mixed arrangements page in the Hansel and Petal site. It currently contains 24 small images with accompanying captions. That are hard-coded into the HTML. Clicking one of the images loads a dummy page for a description of the flower arrangement. By the end of this chapter, we'll have converted both pages so they draw content from a database. The database system that we'll be using is MySQL, which its website describes as the world's most popular open source database, and no wonder, it's powerful and relatively easy to use, and is widely used in combination with PHP. It's the default database system most hosting companies provide with PHP. The built in PHP functions that we'll be using in this chapter are designed to work exclusively with MySQL. But…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Loading data into MySQL5m 37s
-
(Locked)
Connecting to the database7m 47s
-
Querying the database6m 15s
-
(Locked)
Displaying the results of the query3m 50s
-
(Locked)
Using modulo division to establish a repeating series4m 20s
-
(Locked)
Repeating output at specific intervals in a loop4m 56s
-
(Locked)
Linking to a details page2m 40s
-
(Locked)
Embedding a variable in a query securely6m 5s
-
(Locked)
Handling database errors gracefully--and securely8m 40s
-
(Locked)
-
-