Authenticate problem

From: Date: Wed, 21 Nov 2001 21:33:03 +0000
Subject: Authenticate problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14518@lists.php.net to get a copy of this message
Dear list members, I have login page which passes the user name to the next screen. If the user is correct i want to direct him to the actual application. If not right then i want to display a notlogged page. I am doing the following. <? $USER=($HTTP_POST_VARS["USER"]); $PASSWORD=($HTTP_POST_VARS["PASSWORD"]); $strconnectionuser=mysql_connect("123.345.678.900","$USER") or die ("Error on connection string."); if ($strconnectionuser=="Resource id #1") {$mysqlselect=mysql_select_db(assetbase, $strconnectionuser) or die ("database incorrect"); header("Location: http://192.168.200.98/frame_main.htm"); } else { header("Location: http://192.168.200.98/notlogged.htm"); } It works fine if the user is right and takes the suer to the application. But if i type in a user not allowed it gives me the following error and does not direct to the notlogged page. Warning: MySQL Connection Failed: Access denied for user: 'sa@dev.crispin.com' (Using password: NO) in /var/www/html/scripts/login.php on line 4 Error on connection string. How can i skip that message and send the user to the not logged page?? Please help. Regards, Harpreet Kaur Software Developer Crispin Corporations Inc.

« previous php.db (#14518) next »