num_rows; $result2 = mysqli_fetch_array($result, MYSQLI_ASSOC); $master = $result2['master']; $char_name = $result2['char_name']; $skin = $result2['skin']; mysqli_free_result($result); if($rowcount == 0) { header("location: ./admin/applications"); exit(); } $data = date("d-m-Y h:i:s"); $user_check_query = "UPDATE application SET `status` = '2', `accepted` = '1', `reason` = '$verdict', `date_of_verdict` = '$data' WHERE `id` = '$app_id' LIMIT 1"; $result = mysqli_query($link, $user_check_query); mysqli_free_result($result); $phone_num = rand(100000, 999999); $user_check_query = "INSERT INTO `characters` (master, char_name, PhoneNumbr, Activated, Model) VALUES ('$master', '$char_name', '$phone_num', '1', '$skin')"; $result = mysqli_query($link, $user_check_query); mysqli_free_result($result); $masterrr = returnMaster($link, $master); $body = "Dear $masterrr,

Your character application for $char_name has been accepted. You can now start to play on our server with your new character using the password which you have chosen in your application:

IP: $server_ip
Hostname: [0.3-DL] [LS] Legacy Roleplay | legacy-rp.net
Player slots: 100
Server password: N/A

Regards,
Legacy Role Play"; insertNotification($link, $master, "Character Application", $body, $username); //Discord_AlertStaff("$username has accepted character application **#$app_id**."); header("location: ./admin/application/$app_id"); ?>