access_code = $have_account->access_code; $this->access_level = $have_account->account_level; } private function user_info($username,$password){ $username = md5($username); $password = md5($password); $find_account = mysql_query("SELECT * FROM users WHERE username='$username' and password='$password'"); $have_account = mysql_fetch_object($find_account); $this->account_id = $have_account->account_id; $this->account_name = $have_account->name; } public function __construct($username,$password,$table,$sql_vars){ $this->user_info($username,$password); $this->get_db($table,$sql_vars,$this->account_id); $this->table = $table; } } //Use $access_system = new user_db($username,$password,$table,$sql_vars); ?>