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/cs318on phoenix you'll find three files:
query.php. Copy them to your
public_htmldirectory 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.phpwill 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.phpto reflect this. Refer to the descriptions of
pg_cmdtuplesin the online PHP documentation.