X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8A8FFD1B8BC for ; Wed, 7 Apr 2004 06:00:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 87663-07 for ; Wed, 7 Apr 2004 06:00:13 -0300 (ADT) Received: from hotmail.com (bay14-f46.bay14.hotmail.com [64.4.49.46]) by svr1.postgresql.org (Postfix) with ESMTP id E6DB8D1B49F for ; Wed, 7 Apr 2004 06:00:10 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 7 Apr 2004 01:59:50 -0700 Received: from 195.92.67.71 by by14fd.bay14.hotmail.msn.com with HTTP; Wed, 07 Apr 2004 08:59:50 GMT X-Originating-IP: [195.92.67.71] X-Originating-Email: [yazkedoo@hotmail.com] X-Sender: yazkedoo@hotmail.com From: "Yasmine Kedoo" To: pgsql-php@postgresql.org Subject: PHP Username & Password Detection From PSQL Database Date: Wed, 07 Apr 2004 08:59:50 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Apr 2004 08:59:50.0570 (UTC) FILETIME=[AF4C80A0:01C41C7E] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/4 X-Sequence-Number: 2661 Hi. I am just beginning to work with PHP & PSQL so forgive me if i make simple mistakes. :-) I created my PSQL database via telnet on my university's database server. I have no problems retrieving and displaying certain data using PHP, but i am unable to recognise a username and password entered via a predefined authentication variable, $PHP_AUTH_USER. The script must recognise the username: 'yamkedoo', and password: 'yasmine'. In the database, the username & password columns are spelt exactly as: 'username' & 'password'. The database name is 'yamkedoo', and the table name is 'PatPerInfo', as can be seen from the following code: if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"Authentication\""); Header( "HTTP/1.0 401 Unauthorized"); echo "No Login\n"; exit; } else { echo "User: $PHP_AUTH_USER
"; echo "Password: $PHP_AUTH_PW
"; } \n"; exit; } ?> After the username and password, i get the following error: Parse error: parse error in /home/webpages/yamkedoo/Tests/referrals2.php on line 44. Please view te following link: http://www.cyber.brad.ac.uk/~yamkedoo/Tests/referrals2.php to see what is happening. Only once has the authentication window appeared, and has not done so since. It only gives the error as seen at the link. Can anyone help? Thank You :-) _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger