rendered paste body<?
//MUST REVIEW! ERROR WITH REFRESHING!
$stat = mysql_query("SELECT * FROM users");
$stats = mysql_fetch_array($stat);
if ($stats[battles] == '3') {
$lvlup = mysql_query("UPDATE users SET
level = '2',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+8,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
} elseif ($stats[battles] == '6') {
$lvlup = mysql_query("UPDATE users SET
level = '3',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '9') {
$lvlup = mysql_query("UPDATE users SET
level = '4',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '12') {
$lvlup = mysql_query("UPDATE users SET
level = '5',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '15') {
$lvlup = mysql_query("UPDATE users SET
level = '6',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '18') {
$lvlup = mysql_query("UPDATE users SET
level = '7',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '21') {
$lvlup = mysql_query("UPDATE users SET
level = '8',
hp = '$stats[hp]'+15,
mp = '$stats[mp]'+10,
strength = '$stats[strength]'+4,
intelligence = '$stats[intelligence]'+8,
agility = '$stats[agility]'+8
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '24') {
$lvlup = mysql_query("UPDATE users SET
level = '9',
hp = '$stats[hp]'+35,
mp = '$stats[mp]'+25,
strength = '$stats[strength]'+10,
intelligence = '$stats[intelligence]'+30,
agility = '$stats[agility]'+40
WHERE username = '$logged[username]'");
}elseif ($stats[battles] == '30') {
$lvlup = mysql_query("UPDATE users SET
level = '10',
WHERE username = '$logged[username]'");
}
?>