Chapter 2. Server-Side Scripting Overview

This chapter is about server-side scripting and its relationship to both static HTML and common client-side technologies. By the end, you can expect to gain a clear understanding of what kinds of things PHP can and cannot do for you, along with a general understanding of how it interacts with client-side code (JavaScript, Java applets, Flash, style sheets, and the like).

Static HTML

The most basic type of web page is a completely static, text-based one, written entirely in HTML. Take the simple HTML-only page that Figure 2-1 shows as an example.

The following example displays the source code for the web page shown in Figure 2-1:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Selected Constellations</title>
</head>
<body>
<h1>Constellations</h1>
<ul>
<li><a href="Aquila.html">Aquila</a></li>
<li><a href="Bootes.html">Bootes</a></li>
<li><a href="Cassiopeia.html">Cassiopeia</a></li>
<li><a href="Cygnus.html">Cygnus</a></li> <li><a href="Deneb.html">Deneb</a></li> <li><a href="Draco.html">Draco</a></li> <li><a href="Gemini.html">Gemini</a></li> <li><a href="Leo.html">Leo</a></li> <li><a href="Libra.html">Libra</a></li> <li><a href="Lynx.html">Lynx</a></li> <li><a href="Orion.html">Orion</a></li> <li><a href="Pegasus.html">Pegasus</a></li> <li><a href="Perseus.html">Perseus</a></li> ...

Get PHP6 and MySQL® 6 Bible 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.