I work on a php installer.
What I want is that the Page sleeps 5 seconds, whereafter the Mainpage is loaded. I want a loading animation during this time.
My first working code without animation
$redir = str_replace('install/','',$redir);
        sleep(5);
        header( 'Location: ' . $redir . 'home' ) ;
    }
And this was my try with animation.
$redir = str_replace('install/','',$redir);
        ob_start();
        echo '<style>.register{display:none;}<style>';
        ob_flush();
        echo '<h1 class="loading">loading...</h1>';
        ob_flush();
        sleep(5);
        ob_flush();
        header( 'Location: ' . $redir . 'home' ) ;
    }
I think that it is wrong because it's not working.
 
     
     
    