O'Reilly logo

PHP & MySQL: The Missing Manual by Brett McLaughlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Generating Dynamic Web Pages

You’ve been building up quite a robust set of tools. You have PHP scripts to receive requests from your HTML forms. You have MySQL to store information from your users. You have regular expressions to massage information into just the formats you need, and some basic flow controls in PHP like if and for to let you build scripts that make decisions based on what information your users give you.

But at the end of the day, your goal in learning PHP and MySQL is probably to make dynamic and interesting web applications, and you’ve not done much of that yet. You’ve got a few interesting forms, but even those are pretty simple: take in some information and print it back out; accept a SQL query (and do that quite imperfectly).

Thankfully, you’ve got everything you need to start building pages that are built dynamically using your user’s information and full-fledged web applications. You can get information from your users, store it in a database, and even do some basic data manipulation. It’s time to put it all together into the web pages that folks expect: a place to enter their information, a place to see their information, and in most cases, a place to look at all related user information.

Revisiting a User’s Information

On Access Request Parameters Directly, you built a form that took in a user’s basic social media profile: a Twitter handle, a Facebook URL, and some basic contact information. That form is shown in Figure 6-1: it’s simple and easy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required