Trouble with code
Posted: Sat Jan 22, 2005 12:57 pm
I get this error:
Fatal error: Undefined class name 'db' in /home/eatsp1es/public_html/developers/portal/adduser.php on line 18
Line 18: if (DB::isError($name_check)) { Heres the script below:
help would be appreciated, thanks....
Fatal error: Undefined class name 'db' in /home/eatsp1es/public_html/developers/portal/adduser.php on line 18
Line 18: if (DB::isError($name_check)) { Heres the script below:
Code: Select all
if (!get_magic_quotes_gpc()) {
$username = addslashes($username); }
$name_check = mysql_query("SELECT Username FROM users WHERE Username=$username");
if (DB::isError($name_check)) {
return($name_check->getMessage());
}
$name_checkk = $name_check->numRows();
if ($name_checkk != 0) {
return('Sorry, the username: $username is already taken, please pick another one.'); $errors++;}help would be appreciated, thanks....