I'm a little bit confused about alert messages in bootstrap and using them in my PHP code. I have an if/else statement and I want the alert success of bootstrap in my if statement block and also danger alert in an else statement block, kindly check my code.
if($mysqli->query($sql) == = true){
echo '<div class="alert alert-success">Thank You!now please login </div>';
header("location:login.php");
} else {
echo '<script language="javascript">';
echo 'alert("Registration Failed, Something Wrong With Your Details")';
echo '</script>';
}