Code: // If char id is 0 and character dont exist do:
{
die "A character ID can never be 0. This character does not exists or have not been created yet!
Please create a new character first.";
}
// Get the character stats from the wc_characters table
$charinfo = mysql_query("SELECT CharacterId, class, points, level, xp, reqxp, money, str, agi, inte, sta, backs, chests, feet, hands, helmets, legs, necks, wrists, leftweapons, rightweapons, waists, tinkers, shoulders, rings, profession1, profession2, playerId, hp, mn, armor, dps, rank FROM wc_characters WHERE CharacterId ='$_SESSION[valid_user]'")
or die(mysql_error());
if ($_GET["id"] == "0")
So if a user gets to a url like ?id=1 it should select where characterid = 1