Strange... I have this code on a page..
if ($mode == 'magic' && $spell == 'thundaga')
{
if ($userdata['user_mp'] >= '18')
{
$sql = "UPDATE " . USERS_TABLE . " SET user_mp = user_mp - $thundagamp WHERE username = $userdata['username']";
if ( !($uresults = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Information');
}
$sql="update " . USERS_TABLE . " set battle_message='$thundaga1' where username='$userdata[username]'";
if ( !($uresults = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Information');
}
$sql="update " . USERS_TABLE . " set battle_message='$thundaga2' where username='$urow[username]'";
if ( !($uresults = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Information');
}
$sql="update " . USERS_TABLE . " set user_turn='0' where username='$userdata[username]'";
if ( !($uresults = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Information');
}
$sql="update " . USERS_TABLE . " set user_turn='1' where username='$urow[username]'";
if ( !($uresults = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Fatal Error Updating User Information');
}
}
print"<meta http-equiv=\"refresh\" content=\"1; url=battle.php?mode=main\">";
}
And when I go there, it does all the sql correctly but stays on the pager and doesnt refresh me to battle.php?mode=main... why? It works on other lines in that page but they dont have all the if statement this one has, what did I do wrong?
Thanks!