When ever I try editing a user on OurHabbo on Admin Panel I get this error:
I don't know why, that's when I've clicked edit. Does any one know why, it doesn't actually edit the user at all and I can't change peoples ranks and if I change it on Managers Panel it just saysCode:Your profile has been updated!Error during the execution of the MySQL query : Unknown column 'mission' in 'field list'
But actually, nothings been changed.Code:Your profile has been updated!
I hope someone can help, this is what the users.php file says:
Code:<html> <head> <title>Home</title> <style type="text/css"> a { font-size: 10px; color: #000000; } a:link { text-decoration: none; color: #000000; } a:visited { text-decoration: none; color: #000000; } a:hover { text-decoration: underline; color: #000000; } a:active { text-decoration: none; color: #000000; } body,td,th,p { font-family: Verdana; font-size: 10px; color: #000000; } .12 { color: red; } .11 { color: navy; } .10 { color: ; } .9 { color: darkorchid; } .8 { color: darkorchid; } .7 { color: darkorchid; } .6 { color: darkorchid; } .5 { color: green; } .4 { color: green; } .3 { color: green; } .2 { color: green; } .1 { color: black; } input { font-family: Tahoma, Arial; font-size: 8pt; font-weight: bold; width: 200; color: #000000; background-color: #FFFFFF; border: 1px solid #000000; } select { background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000; width: 200; border: 1px solid #000000; } textarea { background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000; width: 200; border: 1px solid #000000; } </style> </head> <body bgcolor="#ffffff"> <p><u><b>Edit Users</b></u></p> <p>This page allows you to Edit Users<br> Click <a href="index.php">here</a> to go back</p> </body> </html> <? ob_start(); include("config.php"); if($logged[username] && $logged[level] == 12) { //checks to see if the user is logged in, and if their user level //is 5 (this is administrator) if($_GET[user]) { //checks to see if there is a ?user=username variable in the url. if (!$_POST[update]) { // the form hasn't been submitted. We continue... $user = mysql_query("SELECT * from users where username = '$_GET[user]'"); $user = mysql_fetch_array($user); //these lines get the user's information and put it in an array. //we will display the information in the html form echo(" <div align=\"left\"><p>You are editing the user: <span class=\"$user[level]\"><b>$user[username]</b></span></p><form method=\"POST\"> <table width=\"100%\" align=\"left\"> <tr> <td align=\"right\" width=\"25%\"> User Level<br><b>Top option is what is currently set.</b> </td> <td align=\"left\"> <select name=\"level\" id=\"level\" tabindex=\"2\" size=\"1\" style=\"width: 200; height: 23\"> <option>$user[level]</option> <option value=\"0\">Banned</option> <option value=\"1\">User</option> <option value=\"2\">Webdesigner</option> <option value=\"3\">Graphics Designer</option> <option value=\"4\">News Reporter</option> <option value=\"5\">Radio DJ</option> <option value=\"6\">Forum Trainee Hobba</option> <option value=\"7\">Forum Moderator</option> <option value=\"9\">(Asst) Manager</option> <option value=\"10\">Player Support</option> <option value=\"11\">Super Moderator</option> <option value=\"12\">Administrator</option> </select> </td> </tr> <tr> <td align=\"right\" width=\"25%\"> Can use Chatrooms<br><b>Top option is what is currently set.</b> </td> <td align=\"left\"> <select name=\"chat\" id=\"chat\" tabindex=\"3\" size=\"1\" style=\"width: 200; height: 23\"> <option>$user[chat]</option> <option value=\"Yes\">Yes</option> <option value=\"No\">No</option> </select> </td> </tr> <tr> <td align=\"right\" width=\"25%\"> <b><font color='red'>*STAFF ONLY*</b></font> Mission </td> <td align=\"left\"> <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"mission\" value=\"$user[mission]\"></td> </tr> </tr> <tr> <td align=\"right\" width=\"25%\"> Location </td> <td align=\"left\"> <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$user[location]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Homepage</td> <td align=\"left\"> <input size=\"25\" name=\"homepage\" value=\"$user[homepage]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Email Address</td> <td align=\"left\"> <input size=\"25\" name=\"email\" value=\"$user[email]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Picture</td> <td align=\"left\"> <input size=\"25\" name=\"picture\" value=\"$user[picture]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> HabboName </td> <td align=\"left\"> <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"habboname\" value=\"$user[habboname]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Favourite Hotel </td> <td align=\"left\"> <select name=\"hotels\" id=\"hotels\" size=\"1\"> <option>$user[hotels]</option> <option value=\"UK Hotel\">UK Hotel</option> <option value=\"USA Hotel\">USA Hotel</option> <option value=\"CA Hotel\">CA Hotel</option> <option value=\"AU Hotel\">AU Hotel</option> <option value=\"Other Hotel\">Other Hotel</option> </select> </tr> <tr> <td align=\"right\" width=\"25%\"> Favourite Food</td> <td align=\"left\"> <input size=\"25\" name=\"fav_food\" value=\"$user[fav_food]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Best Habbo</td> <td align=\"left\"> <input size=\"25\" name=\"best_habbo\" value=\"$user[best_habbo]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Occupation</td> <td align=\"left\"> <input size=\"25\" name=\"occupation\" value=\"$user[occupation]\"></td> </tr> <tr> <td align=\"right\" width=\"25%\"> Gender</td> <td align=\"left\"> <select name=\"gener\" id=\"gender\" size=\"1\"> <option>$user[gender]</option> <option value=\"Male\">Male</option> <option value=\"Female\">Female</option> <option value=\"Prefer not to disclose\">Prefer not to disclose</option> </select> </tr> <tr> <td align=\"right\" width=\"25%\"> Favourite Colour</td> <td align=\"left\"> <input size=\"25\" name=\"fav_color\" value=\"$user[fav_color]\"></td> </tr> <tr> <td align=\"center\"> </td> <td align=\"left\"> <input type=\"submit\" name=\"update\" value=\"Update\"></td> </tr> </table> </form> </center>"); } else { $email = htmlspecialchars($_POST[email]); $aim = htmlspecialchars($_POST[aim]); $msn = htmlspecialchars($_POST[msn]); $picture = htmlspecialchars($_POST[picture]); $locate = htmlspecialchars($_POST[locate]); $level = htmlspecialchars($_POST[level]); $habboname = htmlspecialchars($_POST[habboname]); $hotels = htmlspecialchars($_POST[hotels]); $homepage = htmlspecialchars($_POST[homepage]); $chat = htmlspecialchars($_POST[chat]); $fav_food = htmlspecialchars($_POST[fav_food]); $best_habbo = htmlspecialchars($_POST[best_habbo]); $occupation = htmlspecialchars($_POST[occupation]); $gender = htmlspecialchars($_POST[gender]); $fav_color = htmlspecialchars($_POST[fav_color]); $mission = htmlspecialchars($_POST[mission]); // the above lines get rid of all html. echo ("Your profile has been updated!"); $update = mysql_query("Update users set email = '$email', msn = '$msn', aim = '$aim', picture = '$picture', location = '$locate', habboname = '$habboname', homepage = '$homepage', hotels = '$hotels', fav_food = '$fav_food', best_habbo = '$best_habbo', occupation = '$occupation', gender = '$gender', fav_color = '$fav_color', level = '$level', chat = '$chat', mission = '$mission' where username = '$_GET[user]'") or die ('Error during the execution of the MySQL query : ' . mysql_error()); $date = date("j F G : i"); mysql_query("INSERT INTO `logs` (`id` , `description`, `user`, `date` ) VALUES (NULL , 'Updated the user $_GET[user]', '$logged[username]', '$date')"); //Inserts into the D.B // updates the information in the database. } } else { $getusers = mysql_query("Select * from users order by username asc"); while($users = mysql_fetch_array($getusers)) $date = date("j F G : i"); mysql_query("INSERT INTO `logs` (`id` , `description`, `user`, `date` ) VALUES (NULL , 'Viewed Edit Users Page', '$logged[username]', '$date')"); //Inserts into the D.B { //makes a list of all the users echo("<a href=\"users.php?user=$users[username]\">$users[username]</a><br />"); //displays the user's names } } } else { //the user's level is not 5! They cannot view this page echo("Sorry, but you are not allowed to view this page!"); } ?>





Reply With Quote


