I can't figure this out!
I'm trying to do a user authentication script for the first time.
Here's the page - http://www.karinne.net/admin/
Here's the error - Parse error: parse error, unexpected T_STRING in /home/karinne/karinne.net/admin/index.php on line 21
Here's the code -
$conn = pg_connect ("dbname=karinne user=karinne password=karinne");
$auth = false; // Assume user is not authenticated
if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW)) {
$login = pg_exec ("select * from users where userid='$PHP_AUTH_USER' and password='$PHP_AUTH_PW'");
$num = pg_numrows($login);
if ($num != 0) {
$auth = true;
}
}
if (!$auth) {
header( 'WWW-Authenticate: Basic realm="Private"' )
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;
} else {
header( 'Location: /jeep/' );
}
[/color][/size]
Bold is line 21. What am I missing here?
TIA