Maybe a problem here?
training.php //After the JavaScript function is called it will check to see if this is correct.
<?php
if(isset($_POST['train']) && $_POST['train'] == $char['class'] && $_POST['train'] == "Fighter")
{
if($char['gold'] >= "500000" && $char['blood'] >= "1000" && $char['level'] >= "500"){
$newclass = "Fighter II";
$newgold = $char['gold'] - 500000;
$newblood = $char['blood'] - 1000;
$updatecharacter = mysql_query("UPDATE characters SET gold='".$newgold."', class='".$newclass."', blood='".$newblood."' WHERE id='".$_SESSION['userid']."'");
$messagechat = "<strong><font color=\'#660077\'><b>".$char['username']."</b> has upgraded their class to <b>".$newclass."</b>. Allowing them to equip better means of Weapons or Protection Gear and increased their Stats gained per level.</font></strong><br />";
$query = mysql_query("INSERT INTO chatroom (`date`, `userlevel`, `username`, `message`, `to`) VALUES ('".$date."', '3', '".$char['username']."', '".$messagechat."', 'Chatroom')");
$data .= "You were very cooperative during your training period. You have successfully upgraded to ".$newclass."!<br />";
}else{
$data .= "You do not have the assets to pay for training.";
}
}