$sql = "UPDATE profiles SET name='$name' lvl='$lvl',race='$race',class='$class' WHERE name='$name'";
You're missing a comma after SET name='$name'
Secondly, I don't think you can say where name='$name' if they're updating. You should say WHERE id='$id'
$name changes. If in the database you have Bob as a name, and they just changed their name through the form to Jason, you're query would
UPDATE your_table SET this to equal that where name = Jason
But name = Bob in the databse, not Jason. Use an id field instead for your WHERE clause.
Cgraz