you already had the answer to this problem. do try to read the error message
properly.
a 'non object' is quite clear - if in doubt about what something is or something
should be use var_dump() or print_r() to output the variable in question (e.g.
$DB, which
you would have seen was NULL).
now fo
nihilism machine wrote:
// Connect to the database
public function __construct() {
$DB = new db();
Everything Nathan said, plus change the $DB to $this->DB in your
construct() method.
Jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
change
$rows = $DB->select("SELECT * Users WHERE Email='$Email', AND
Password='$PasswordEncoded'");
to
$rows = $this->DB->select("SELECT * Users WHERE
Email='$Email', AND
Password='$PasswordEncoded'");
you have to always reference the current instance w/ the $this ke
I amn trying to use my db class in my auth class, but i get the error:
call to a member function select() on a non object
connect();
}
// Connect to MySQL Server
private function connect() {
$this->link = mysql_connect($this->db_server,$this->db_user,$this-
>db_pass)
4 matches
Mail list logo