On the site I have developed, the user must login with a $_POST request to validate credentials. I have implemented a jQuery UI effect that makes the screen black (and does some animation on the black screen) before the login form undergoes a submit() event. When the submit() is $_POSTed, the credentials are validated and header() is used to redirect to 'home.php'. This animation is then "continued" (black color plus animation) as home.php loads, and finally the page "appears" after the body has loaded.
The problem is this: in the brief moment that includes the login validation on login.php and the PHP processing in home.php, there is a white flash that I DO NOT want.
Here is the sequence I want: click login button (not black screen) ---> jQuery animation (black screen) ----> form submit (still black screen) ----> $_POST validation (still black screen) ---> header('location: home.php') (still black screen)----> PHP processing (still black screen) ----> jQuery animation (still black screen) ----> page is revealed (not black screen)
Here is the sequence I get: click login button (not black screen) ---> jQuery animation (black screen) ----> form submit (still black screen) ----> $_POST validation (now a white screen) ---> header('location: home.php') (white screen)----> PHP processing (white screen) ----> jQuery animation (now a black screen) ----> page is revealed (not black screen)
To reiterate, during PHP processing, the page flashes white, briefly but noticeably, between black screens.
The file home.php has a massive, intricate block of PHP before the <html>
tag, and needs to be kept as is. I am looking for a function that does what I need. I googled "PHP set screen color" and related searches, but I only get hits regarding image colors.
Is there any PHP function that would set the default screen color to black during this flash (PHP processing phase) so that instead of a brief white flash, it is a brief black flash?