$rows = $rs1->rows; if (!$rows) { report_error("username does not exist"); } else { report_error("username_exists"); }