... writing a program that creates a file and adds data to it.
Introducing the saveSonnet .php Program
The saveSonnet .php program shown in the following code opens a file on the
server and writes one ... is
very handy if you use the quiz in a classroom setting.
Saving a File to the File System
Your PHP programs can access the server’s file system to store and retrieve infor-
mation. Your pro...
... 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...
... Table Data
You can use phpMyAdmin to browse your table in a format much like a spread-
sheet. Figure 9.12 illustrates this capability.
Follow these steps to edit a table in phpMyAdmin:
1. Select ... appropriate SQL code.
TRICK
FIGURE 9.12
Use the Browse tab
to view table data.
Exporting a Table
Some of phpMyAdmin’s most interesting features involve exporting table infor-
mation. You can gener...
... powerful spymaster application in PHP.
The spy database reflects a few facts about my spy organization (called the Pan-
theon of Humanitarian Performance, or PHP) .
• Each agent has a code name.
• ... Create Databases,” it isn’t difficult
to build a data table, especially if you have a tool like phpMyAdmin. Figure 11.1
illustrates the schema of my first pass at the
spy database.
At first...
... databases for spy examples
# uses mysql - should adapt easily to other rdbms
# by Andy Harris for PHP/ MySQL for Abs. Beg
######################################
368
P
H
P
5
/M
y
S
Q
L
P
r
o
g
r
a
m
m
i
n
g
f
o
r
t
h
e
A
b
s
o
l
u
t
e
B
e
g
i
n
n
e
r
IN ... names.) I specified that all field names will use
camel-case (just like you’ve been doing with your PHP variables). I also named the
ke...
... DirectX 9
ISBN: 1-59200-349-4
$29.99
Beginning OpenGL
Game Programming
ISBN: 1-59200-369-9
$29.99
PHP
Game Programming
ISBN: 1-59200-153-X
$39.99
RISE T O T HE TOP OF YOUR
GAME WI T H COURSE P ... regarding use of the software.
W
w+ file access modifier,
188
WAMP (Windows, Apache, MySQL, and PHP) ,
5
Web servers
connections, 316–317
functions, 5
programming on, 3–4
testing, 7–8
WHERE clau...