An error suddenly occurred while I was debugging my code. It has this series of errors regarding the connection to database.
ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
( ! ) Fatal error: Uncaught exception 'PDOException' with message ' in C:\wamp\www\web\main\users.php on line 15
( ! ) PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. in C:\wamp\www\web\main\users.php on line 15
this is the code of where the error is pointing
function __construct()
{
$this->con = new PDO("mysql:host=".$this->host.";dbname=".$this->db,$this->user,$this->pass);
}
I don't know what to do since I do not usually get problems like this so I haven't studied much about WAMP. Thank You for your help.