ignore_user_abort(true);
function connect(){ //connect to the database
mysql_connect("","[username]");
mysql_select_db("[dbasename]");
}
for($i = 1; $i <= 5; $i++){
if(connection_status() != 0){
connect();
$result=mysql_query
("insert into [tablename]
([cellname])
values('$i')");
}
sleep(2);
}
I've worked this everyway I can think of. Individual components (connect, update, loop etc) work fine in and of themselves. Somehow though, the 'ignore_user_abort()' isn't working. When the user clicks the stop button on the client (ie6), the loop should continue (last iteration), detect the new connection_status() and update the record. Instead, when the user clicks the stop button the script dies. I don't know that it matters much, but this is running on a win2k platform.
If anyone hase any pointers I'd really appreciate it
Thanks