php - Parse error site -
i have parse error on site, how can prepare it?
error:
parse error: syntax error, unexpected 'function__construct' (t_string), expecting variable (t_variable) in /home/retropla/domains/triangledevelopment.nl/public_html/classes/class.user.php on line 7
class.users.php:
<?php include('class.password.php'); class user extends password{ private $db; function__construct($db){ parent::__construct(); $this->_db = $db; } public function is_logged_in(){ if(isset($_session['loggedin']) && $_session['loggedin'] == true){ homecoming true; } } private function get_user_hash($username){ seek { $stmt = $this->_db->prepare('select password blog_members username = :username'); $stmt->execute(array('username' => $username)); $row = $stmt->fetch(); homecoming $row['password']; } catch(pdoexception $e) { echo '<p class="error">'.$e->getmessage().'</p>'; } } public function login($username,$password){ $hashed = $this->get_user_hash($username); if($this->password_verify($password,$hashed) == 1){ $_session['loggedin'] = true; homecoming true; } } public function logout(){ session_destroy(); } } ?> i'm creating website on tutorial , display error.
function__construct($db){
should be:
public function __construct($db){ there needs space between function , __construct. php parse-error
No comments:
Post a Comment