I am having a problem with my mvc framework, my entire site is using a single session id so when I log in using my pc as soon as i visit the site with another device that device uses that same session , Does anyone know where the problem might be this is the code inside my sessions.php
file where sessions are set
public static function set($value,$key)
{
$_SESSION[$key] = $value;
}
And below is my login function
$email = $_POST['email'];
$password = $_POST['password'];
$password = md5($password);
$statement = $this->db->prepare("SELECT * FROM users WHERE email=:email AND password=:password");
$statement->execute(array(':email'=>$email,':password'=>$password));
$results = $statement->fetch(PDO::FETCH_ASSOC);
$count = $statement->rowCount();
if ($count>0) {
$id = $results['id'];
session::init();
session::set($id,"id");
echo json_encode(array('status'=>true));
}