... You added PHP. You
changed the Apache configuration to recognize PHP. You saw how PHP code can
be integrated into an HTML document. You learned how to change the configu-
ration file for PHP to ... I
n chapter 1, “Exploring the PHP Environment,” you learn the foundations of
all PHP programming. If you have your environment installed, you’re ready to
write some PHP programs. Comput...
... including PHP.
• Be careful about case. PHP is a case-sensitive language, which means that it
considers
$userName, $USERNAME, and $UserName to be three different variables.
The convention in PHP is ... refer to a variable, PHP checks to see
if that variable already exists somewhere in your program. If so, it uses
that variable. If not, it quietly makes a new variable for you. PHP w...
... contain any PHP at all. It’s simply an HTML
page with a form on it. When the user clicks the
Submit Query button, the page
sends the value in the text area to a PHP program called
hiUser .php. Figure ... Data
The code for hiUser .php is specially built. The form that called the hiUser .php
code is expected to have an element called userName. Take a look at the code for
hiUser .php an...
... program in its entirety.
Starting HTML
Like most PHP programs, the Petals game uses some HTML to set everything up.
The HTML is pretty basic because PHP code creates most of the interesting HTML.
<HTML>
<head>
<title>Petals ... background with a whimsical font. This should give the program
a light feel.
Main Body Code
The main PHP code segment has three main jobs: prin...