This question already has an answer here:
Parse error: syntax error, unexpected end of file in C:\Users\p\Desktop\xampp\htdocs\myproject\login.php on line 55
So I dont know what is causing this problem I have only started to learn Php and Html. Can anyone help fix this.
Here is the code.
Line 55 is at the bottom.
if(isset($_POST['submit'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$connection = mysqli_connect('localhost', 'root', 'root', 'loginapp');
if($connection) {
echo "We are connected";
} else {
}
die("Database connection failed");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="col-sm-6">
<form action="login.php" method="post">
<div class="form-group"></div>
<label for="username">Username</label>
<input type="text" name="username" class="form-control">
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password" class="form-control">
<input class="btn btn-primary" type="submit" name="submit" value="Submit">
</div>
</form>
</div>
</div>
</body>
</html>