<?php
function HTMLbegin($title) {
// First, we'll break out of PHP for a short while ...
// The following lines are some HTML lines.
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<?php
// Insert a page title depending on the user's choice
echo " <TITLE>This is my $title font page</TITLE>\n"; // The title is inserted.
// Now we break out of PHP again ...
?>
<STYLE TYPE="text/css">
<?php
// Set the font-family depending on the user's choice
echo " BODY { font-family : $title; }\n"; // The title is inserted.
// Now we break out of PHP again ...
?>
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<?php
// Back in PHP again
} // The HTMLbegin() function ends here
function HTMLbody($title) {
// We're breaking out of PHP ...
?>
<H1>Greetings!</H1>
<HR>
<?php
// Back in PHP ...
echo "You're now on my <B><U>$title</U></B> page!<BR>\n";
} // The HTMLbody() function ends here
function HTMLlinks() {
// We're breaking out of PHP ...
?>
<A HREF="index.php?what=verdana">Verdana Font Page</A>
<BR>
<A HREF="index.php?what=impact">Impact Font Page</A>
<BR>
<A HREF="index.php">Arial Font Page</A>
<?php
} // The HTMLbody() function ends here
function HTMLend() {
// We're breaking out of PHP ...
?>
</BODY>
</HTML>
<?php
} // The HTMLend() function ends here
function buildHTML($title) {
HTMLbegin($title);
HTMLbody($title);
HTMLlinks();
HTMLend();
}
?>