gogelpot
10-18-2006, 03:44 AM
Hi I am updating a DB with a php script. The db is large and therefore I refresh the page after every 500 entrys have been updated.
$x = 0;
while ($x < $num){
$x++;
if ($x == 500){
header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1');
}
}
If I add a exit statment and leaving out the header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1'); statment in the IF($x == 500) it does exit. But with header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1'); statment alone in the If {} it does not redirect the page. It is as if the if ($x == 500){ } does not exist, it continues with the script after the if ($x == 500){ } statment. So the page is not refreshed.
Could someone please help me.
$x = 0;
while ($x < $num){
$x++;
if ($x == 500){
header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1');
}
}
If I add a exit statment and leaving out the header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1'); statment in the IF($x == 500) it does exit. But with header('Location: http://127.0.0.1/FC Data/tempbat1.php?Flag=1'); statment alone in the If {} it does not redirect the page. It is as if the if ($x == 500){ } does not exist, it continues with the script after the if ($x == 500){ } statment. So the page is not refreshed.
Could someone please help me.