If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to disable Warnings

It is successful, however when there is an error, warning from PHP overrides die() statements given by me. It first shows its' warning, and then the error message within the die().

But I just want to show the message in die() statement, not the one generated by PHP or ODBC.

The following is an example

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in H:\wamp\test\index.php on line 7Could not connect to the Database.

Text in Red generated by PHP & ODBC.
Text in Blue generated by the die() statement.

The following is the code used.

PHP Code:

$odbc = odbc_connect($dsn,$user,$pass) or die('Could not connect to the Database.');

It will be a great help if someone let me know how to limit the error message to die().