alert :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bookstore</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<!-- <div class="alert alert-danger">
<strong>Danger!</strong> This alert box could indicate a dangerous or potentially negative action.
</div> -->
<?php
echo "<script type = \"text/javascript\">
alert(\"you need to login \");
window.location = (\"index.php\");
</script>";
?>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
connection :
<?php
$conn = mysqli_connect('localhost','root','','bookstore');
if(!$conn) {
die('unable to connect');
}else{
//echo "succssesfull";
}
?>
0 Comments