<?php
/**
  *User class
 */

include('class.mysql.php');

class User{
	private $db;			//database object
	private $dbtable = 'users';		//table name

	/**
	  * constructor
	 */
	function User(){
		$this->db = new MySql();
	}

	/**
	  * test if email exists in db
	  * @param string email address
	  * @return bool
	*/
	public function emailInDB($email){
		$query = 'SELECT * FROM `'.$this->dbtable.'` WHERE email="'.$email.'"';
		$res = $this->db->ExecuteSQL($query);
		if($res) return TRUE;
		return FALSE;
	}

}
?>



