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:
'[EMAIL PROTECTED]' (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.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]