You are on page 1of 1

<?

php

require_once 'connection.php';

class User{

private $db;
private $connection;

function _constuct(){

$this->db = DB_connection();
$this->connection = $this->db->get_connection();
}

public function does_user-exist($email,$password)


{
$query = "Select * from users where email = '$email' and
pasword = '$password'";

}
$user = new user();
if (isset($POST['email'],$POST['password'])){
$email = $_POST['email'];
$password = $_POST['password'];

if(!empty($email) && !empty($password)){

$encrypted_password = md5($password)
$user -> does_user-exist($email,$encrypted_password);
}
else {
echo json_encode("you must fill both fields");

>>

You might also like