Chapter 8. Connecting to a Database
In the previous chapter, we created a user interface for users to add their lists and items to the list through an HTML form. You learned about the basics of the form and its attributes, how to handle the data submitted by a user on the server side, and how to prevent the user from entering wrong data in the application through validations. Now that valid data has reached the server side, let's persist the data for the users so that we can show it back to the user whenever the user wants. To achieve this, we need to store it to the database, which you are going to learn step by step in this chapter.
In this chapter, we will discuss the following topics:
- How to connect and communicate with a database
- How to use ...