0

Hi,

How do i prevent printing "Warning" bit of connection error? I only want see my error message on screen.

Note: I deliberetly enter wrong Host IP to see the message thou.

Warning: mysql_connect() [function.mysql-connect]: Host '127.0.0.123123' is not allowed to connect to this MySQL server in C:\apache\login\database.php on line 3
ERROR: Server connection error;
$conn = mysql_connect(self::DBSRV, self::DBUID, self::DBPSW);
if(!$conn){
die("ERROR: Server connection error;");
}

Thanks

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by veledrom
0

Just got a message from different forum and solved. I didn't know it could be this simple.

Put @ before 'mysql_connect'
@mysql_connect

Edited by veledrom: .

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.