Processing model:
$handle = pg_connect("dbname=databaseName user=userName password=pwd");
Check handle status! Why handles? (Script could have multiple DB
connections open.)
$result = pg_exec($handle, "query string");
Check result status!
pg_numrows($result),
pg_numfields($result). $item = pg_result($result, $row, $field); $item = pg_result($result, $row, "fieldName");
$row and $field are 0-based numeric indices.
fieldName is an associative array-style index. pg_freeresult($result); pg_close($handle);
login.html
login.txt
authenticate.php
authenticate.txt
query.php
query.txt
Things to note for each file:
login.html:
authenticate.php:
Why the check on pg_numrows()?
SID back to the server as a GET parameter.
SID will be empty when we resume the session.
query.php: