I want to display a success message after the user switches password, with bootstrap and PHP.
Here's what I'm trying to do:
if($login == null){
header("Location: index.php");
} else {
$_SESSION["email"] = $email;
header("Location: dashboard.php");
$_SESSION['mensagem'] = '<div class="alert alert-success" role="alert">Senha alterada com sucesso!</div>';
}
die();
And calling the variable on the page where the message should appear:
<?php echo $_SESSION['mensagem'] ;?>