I believe I have misplaced a { or }
When i click
if ($action == change) {
$class = mysql_fetch_array(mysql_query("select * from classes where id=$id"));
if ($stat[user_att] < $class[req_att] and $stat[user_def] < $class[req_def]) {
print "<center><b>You still cant change class..</b></center>";
include("footer.php");
exit;
} else {
$sql = "UPDATE players SET user_class = $class[name] WHERE id = $stat[id]";
mysql_query("$sql");
print "You changed your class from $stat[user_class] to $class[name]. ";
}
}
When i click a link that goes to....
<a href='classes.php?action=change&id=$class[id]'>Change Class</a>
It says it has changed the class, but my user_class field is not changed to the new selected one, $class[name]
I hope i made sense, I am fairly new to php. Thanks for any help.
-Dusk
Thanks alot man, ill have to go back and redo some things.