Chapter 8. Data In, Data Out
In This Chapter
Connecting to the database
Getting information from the database
Using HTML forms with PHP
Getting data from an HTML form
Processing the information that users type into HTML forms
Storing data in the database
Using functions to move data into and out of the database
PHP and MySQL work well together. This dynamic partnership is what makes PHP and MySQL so attractive for Web database application development. Whether you have a database full of information that you want to make available to users (such as a product catalog) or a database waiting to be filled up by users (for example, a membership database), PHP and MySQL work together to implement your application.
One of PHP's strongest features is its ability to interact with databases. It provides functions that make communicating with MySQL extremely simple. You use PHP functions to send SQL queries to the database. You don't need to know the details of communicating with MySQL; PHP handles the details. You only need to know the SQL queries and how to use the PHP functions.
In previous chapters, I describe the tools that you use to build your Web database application. You find out how to build SQL queries in Chapter 4 and how to construct and use the building blocks of the PHP language in Chapters 6 and 7. In this chapter, you find out how to use these tools for the specific tasks that a Web database application needs to perform.
PHP and MySQL Functions
You use built-in PHP functions to interact ...
Get PHP and MySQL® For Dummies®, 4th Edition 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.