Parker Clack
06-23-2002, 02:13 AM
I have created a usergroupid of 14 for inactive users. I want to use a checkuser that if another person comes along with the same username and signs up it deletes the old username from the inactive list.
I have so far:
if ($checkuser=$DB_site->query_first("SELECT username FROM user WHERE usergroupid==14 AND (username='".addslashes(htmlspecialchars($username))."' OR username='".addslashes(eregi_replace("[^A-Za-z0-9]","",$username))."')")) {
DB_site->query("DELETE FROM user WHERE userid='bbuserinfo['userid']'");
}
which I know isn't right but is in the general ball park at least. :)
Thanks for any help.
Parker
I have so far:
if ($checkuser=$DB_site->query_first("SELECT username FROM user WHERE usergroupid==14 AND (username='".addslashes(htmlspecialchars($username))."' OR username='".addslashes(eregi_replace("[^A-Za-z0-9]","",$username))."')")) {
DB_site->query("DELETE FROM user WHERE userid='bbuserinfo['userid']'");
}
which I know isn't right but is in the general ball park at least. :)
Thanks for any help.
Parker