$_SESSION['MSG']="Incorrect email id and password"
is in red color.
After 5 sec it will hide and after that I want to show Try again later in yellow color at same place after 5 sec. $_SESSION['try']="Try again later"
but it will not hide until page is not reload or refresh:
<?php
session_start();
if(isset($_SESSION['MSG'])){
echo '<div id="incorrect">' . $_SESSION['MSG'] . '</div><script
type="text/javascript">
function showIt() {
document.getElementById("incorrect").style.visibility = "hidden";
}
setTimeout("showIt()", 5000);
</script>';
}
unset ($_SESSION['MSG']);
session_destroy ();
?>