Не могу найти ошибку, помогите пожалуйста.
Error: Parse error: syntax error, unexpected T_STRING in Z:\home\test1.ru\www\reg\lib\user_class.php on line 17<?php
class User{
private $db;
private static $user = null;
private function __construct(){
$this->db = new mysqli("localhost", "root", "", "mybase");
$this->db->query("SET NAMES 'utf8'");
}
public static function getObject(){
if(self::$user === null) self::$user = new User();
return self::$user;
}
public function regUser($login, $password){
if($login = "") return false;
if($password = "") return false;
$password = md5($password);
return $this->db->query("INSERT INTO `users` (`login`, `password`, `regdate`) VALUES ('$login', '$password', '."time()".')");
}
private function chekUser($login, $password){
$result_set = $this->db->query("SELECT `password` FROM `users` WHERE `login` = '$login' ");
$user = $result_set -> fetch_assoc();
$result_set->close();
if(!$user) return false;
return $user["password"] === $password;
}
public function isAuth($login, $password){
session_start();
$login = $SESSION["login"];
$password = $SESSION["password"];
return $this->chekUser($login, $password);
}
public function login($login, $password){
$password = md5($password);
if($this->ckekUser($login, $password)){
session_start();
$SESSION["login"] = $login;
$SESSION["password"] = $password;
}
}
public function __destruct(){
if($this->db) $this->db->close();
}
}
?>