I'm doing a login, everything went perfectly with PHP, only I have a problem. When a user is not found in the database, PHP returns the following:
header("Location: ../index.php?error=userNotFound");
This parameter I capture with a GET as follows:
<?php
if(isset($_GET['error']))
{
if($_GET['error']=="userNotFound")
{
?>
<div class="alert alert-danger fade in">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Acceso denegado.<br/></strong> El usuario y/o la contraseña no existe.
</div>
<?php }}?>
The problem is that when I reload the page with F5 or I give Enter to the URL:
?error=userNotFound
It is not deleted, that causes the alert
to reappear and I have to delete it manually.
Can you tell me a way to clean the URL when the page is reloaded?