The home page of my web application works but when I try to log in the message shows:
Type: PDOException
Code: 42S02
Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘epiz__.Users’ doesn’t exist
File: /home/vol14_7/epizy.com/epiz_*****/htdocs/app/Models/UserModel.php
Line: 108
(Yes, I did create a database and imported the user table)
My config file:
<?php
$config['displayErrorDetails'] = true;
$config['addContentLengthHeader'] = false;
$baseUrl = 'http://**********';
$config['db']['host'] = "sql***.epizy.com";
$config['db']['user'] = "epiz_********";
$config['db']['pass'] = "************";
$config['db']['dbname'] = "epiz_******_*******";
?>
**code in UserModel.php lfrom line 108 :**
$statement->execute();
$results = $statement->fetch();
if($results) {
if(empty($results["U_Password"]) && !empty($password)) {
$sql1 = 'UPDATE Users SET U_Password=? WHERE U_Email=?';
$statement1 = $this->db->prepare($sql1);
$statement1->bindParam(1, password_hash($password, PASSWORD_DEFAULT));
$statement1->bindParam(2, $email);
if($statement1->execute()) {
$_SESSION["uid"] = $results["U_ID"];
$_SESSION["firstname"] = $results["U_Firstname"];
$r = true;
}
} else if(password_verify($password, $results["U_Password"])) {
$_SESSION["uid"] = $results["U_ID"];
$_SESSION["firstname"] = $results["U_Firstname"];
$r = true;
}
}
return $r;