if (!$_GET['action']) { $profile = $auth->getprofile($user['id']); $profile['signature'] = str_replace('<br />', '', $profile['signature']); } elseif ($_GET['action'] == 'createchar') { $MANG = new Mangos(); //Post declare: $class =& $_POST["createchar_class"]; //used only as a check to see if it exists $faction =& $_POST["createchar_faction"]; //used only as a check to see if it exists $character_copy_to = $_POST["character_copy_char"]; //Main Declare..... $name = $checknamestring = ucfirst(strtolower(escape_string($_POST['createchar_name']))); $loggedin = 0; // Current ID + 1 $new_guid = $MANG->mangos_newguid('character'); $guid = $new_guid['new_guid']; $WE_DID_OFFSET_ID = $new_guid['incr']; //Checks if wanted name exsits. $name_check = $CHDB->selectCell("SELECT guid from `characters` WHERE name='" . $name . "'"); if ($name_check == FALSE) { $classexists = false; } else { $classexists = true; } //Checks if user is logged on $loggedin = $DB->selectCell("SELECT online FROM account WHERE id=?d", $account_id); //Another check if user is logged on. if ($loggedin == '0') { $loggedin = $CHDB->selectCell("SELECT online FROM `characters` WHERE account=?d", $account_id); }