I am trying to prevent the script from posting the connection details and display a connection error.
Using mysqli but how i even try it always seems to print out the error, using easyPhp 5.3.5.0 apache.
Could it be local settings?
I had no problem using Try and Catch , and prevent it with PDO, but now i am using mysqli with this app.
Been trying some different ways without any luck. (note : mysqli)
public function Connect()
{
// Open db connection
$this->mySQLI = new mysqli($this->hostAddress, $this->dbUser, $this->dbPass, $this->dbName);
if (!$this->mySQLI)
{
die('Connection to database failed');
}
else
{
return true;
}
}
This post has been edited by heady89: 19 February 2011 - 04:17 AM

New Topic/Question
Reply




MultiQuote




|