O'Reilly logo

PHP for Teens by Maneesh Sethi

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 4. Writing the PHP in Your First Program

This chapter will help you complete your first PHP program and learn some of the basic ideas in PHP, such as variables. Before we start, take a look back at the HTML page we created earlier. The HTML looked like the following:

Note

From now on, we are using a valid DOCTYPE and valid header throughout our web pages. This will get you into making all of your web pages follow the standard. Note that the pages work without a DOCTYPE, but it is very much recommended you use them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>A Sample Form</title> </head> ...

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