note 17061 added to function.mysql-connect

From: Date: Sat, 24 Nov 2001 01:09:28 +0000
Subject: note 17061 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-21220@lists.php.net to get a copy of this message
It would be really cool if this worked, so that I don't have to save passwords anywhere: if (!$connection = mysql_connect ("db.pflipp.f2s.com", $HTTP_AUTH_USERNAME, $HTTP_AUTH_PW)) { Header ("WWW-Authenticate: Basic realm=\"serieadmin\""); Header ("HTTP/1.0 401 Unauthorized"); include "authorization.php"; exit; } This cool solution however gets completely screwed up by the mysql_connect warnings: Warning: Access denied for user: 'someuser' (Using password: NO) in /foo/check-user.php on line 4 Can I somehow suppress these warnings? Greets, Pflipp -- http://www.php.net/manual/en/function.mysql-connect.php http://master.php.net/manage/user-notes.php?action=edit+17061 http://master.php.net/manage/user-notes.php?action=delete+17061 http://master.php.net/manage/user-notes.php?action=reject+17061

« previous php.notes (#21220) next »