In my PHP site, I am using script alert for checking invalid username and password. If username and password are wrong, it shows a message box. When I click ok
to it, user will be redirected to index.php page. But I want reload same page, like header('Location: '.$_SERVER['PHP_SELF']);
.
This is my code :
echo "<script>alert('Invalid Username and Password');
location.href='index.php';
</script>";