I have the following code in php
:
<?php
class Users extends DB {
private function verifyUser($email) {
$select = self::conn()->prepare("SELECT * FROM 'users' WHERE email = '{$email}'");
$select->execute();
if ($select->rowCount() >= 1) {
return true;
} else {
return false;
}
}
public function insertUser($data = array()) {
if ($this->verifyUsers($data[2])) {
return false;
} else {
$insert = "INSERT INTO 'users' (email) VALUES (?,?,?)";
$stmt = self::conn()->prepare($insert);
if ($stmt->execute($data)) {
return true;
} else {
return false;
}
}
}
}
It is not working, nor does it show errors . Can anyone help?