© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
M. SimonAn Introduction to PHP https://doi.org/10.1007/979-8-8688-0177-8_6

6. Adding Data to the Database

Mark Simon1  
(1)
Ivanhoe VIC, VIC, Australia
 

We are now ready to complete the uploading task begun in Chapter 4. The ultimate goal is to be able to retrieve the images and to display them, together with information about the images. However, there isn’t much information you can keep with the image file itself, so we use a database to store the information.

When working with the database, we’ll need to first make a connection to the database, which we started on in Chapter 5. In PHP, this connection is represented as a PHP object, which we use to manipulate ...

Get An Introduction to PHP : Learn PHP 8 to Create Dynamic Websites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.