Post: [PHP] Custom SB command not working?
04-03-2014, 08:46 PM #1
Dan
I'm a god.
(adsbygoogle = window.adsbygoogle || []).push({}); I can't get this to work, if someone could help me it'd be much appreciated. I'd rather not show the whole code.

    
elseif (preg_match("#^(/rename\s+?)#i", $message, $matches) && $db->isAdmin()) {
$rename = $db->sanitize(trim(str_replace($matches[0], "", $message)));
$selectuser = $con->query("SELECT * FROM users WHERE username='$rename'");
$checkuser = $con->query("SELECT * FROM users WHERE username='$matches[0]'");
if(!$selectuser or !$checkuser)
{
echo $con->mysql_error();
}
else
{
if($selectuser && !$checkuser)
{
$con->query("UPDATE users SET Username='$matches[0]' WHERE Username='$rename'");
$message = ' has changed the user '.$user.'\'s username to '.$matches[0].'.';
}
else
{
$message = 'The username you have entered is invalid or already taken.';
}
}
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo