I trying to check login credential via xml using php,Following is the piece of code to check DB connection
$con = mysql_connect($host,$user,$pass) or die("<result><message>Could not connect to host</message></result>");
if connection fails throws error like
"XML Parsing Error: junk after document element
Location: http://test.study.com/test/services/checkLogindata.php
Line Number 2, Column 1: ...."

I dont want that message,i want to display simply like ,
<result>
<message>Could not connect to host</message>
</result>
Is it possible to display like above, if yes kindly help me
Finally i found one solution by giving “error_reporting(0);” before mysql_connect();