Tom Kelliher, CS 318
Feb. 20, 2002
The purpose of this lab is to let you get some hands-on experience connecting to PostgreSQL databases through PHP.
~kelliher/pub/cs318
on phoenix you'll find three files:
login.html
, authenticate.php
, and query.php
. Copy
them to your public_html
directory and verify that you can access
the registration database via the files you just copied.
pg_connect()
call and store it as an
additional session variable.
authenticate.php
will fail if called directly. This
makes sense if the session variables haven't been created yet, but it will
still fail even if the session variables have been created. Fix this
anomalous behavior.
query.php
to reflect this. Refer
to the descriptions of stristr
and pg_cmdtuples
in the
online PHP documentation.