This question already has an answer here:
i have this code
here after </html>
i have written my php code .
here inside my php code all code before <script>
tag executes perfectly but code after <script>
that it prints all php code as it is
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bookbus.ng - Merchant Login</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/datepicker3.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="row">
<div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-md-4 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">Log in</div>
<div class="panel-body">
<form role="form" action="login.php" method="post">
<fieldset>
<div class="form-group">
<input class="form-control" placeholder="E-mail" type="email" autofocus required name="user">
</div>
<div class="form-group">
<input class="form-control" placeholder="Password" type="password" value="" required name="pass">
</div>
<div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
</label>
</div>
<a href="login.php" class="btn btn-primary">Login</a>
</fieldset>
</form>
</div>
</div>
</div><!-- /.col-->
</div><!-- /.row -->
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/chart.min.js"></script>
<script src="js/chart-data.js"></script>
<script src="js/easypiechart.js"></script>
<script src="js/easypiechart-data.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script>
!function ($) {
$(document).on("click","ul.nav li.parent > a > span.icon", function(){
$(this).find('em:first').toggleClass("glyphicon-minus");
});
$(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
}(window.jQuery);
$(window).on('resize', function () {
if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
})
$(window).on('resize', function () {
if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
})
</script>
</body>
</html>
<?php
if(isset($_POST['user']) and isset($_POST['pass']))
{
echo "<script>alert('i am bug');</script>";//Here Is Bug
include("include/configuration.php");
$username=$_POST['user'];
$password=$_POST['pass'];
$sql = "SELECT * FROM admin where username='$username' and password='$password'";
$result=mysqli_query($link,$sql) or die("Error".mysqli_error($link));
if($result)
{
$result2=mysqli_num_rows($result);
if($result2)
{
//header("location:index.php");
echo "yes"; //for testing
}
else
{
echo "no";
}
}
else
{
echo "no";// for testing
}
}
?>
</div>