0

I would like a success message to disappear after 3 seconds.

This is my PHP code:

if(!empty($_SESSION['message'])){
    echo '<div class="alert alert-success" role="alert"> '.$_SESSION['message'].'</div>';
    $_SESSION['message'] = "";
}
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
lapomme27
  • 13
  • 2
  • 1
    javascript will be the only want to change content after being delivered to a browser, unless you want to have the entire page reloaded from the server. – Sammitch Feb 27 '21 at 00:56
  • @Sammitch thank you for pointing my mis-read out! +1 for javascript – ccarstens Feb 27 '21 at 01:00

0 Answers0