function email_checker($tess)
{
$name_check = $db_object->query("SELECT m_email FROM mail_list WHERE m_username = '{$_SESSION['username']}' AND m_email = '$tess'");
$name_checkk = $name_check->numRows();
if ($name_checkk != 0) //if number of rows isn't 0, there obviously is already a row with that same username
{
return false;
}
}
What could be wrong with this code? I get the following error:
Fatal error: Call to a member function on a non-object in /var/www/website.com/test.php on line 206 (the first line in the function after the opening { bracket)