-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
64 lines (46 loc) · 1.36 KB
/
login.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
if (isset($_POST['submit'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$connection = mysqli_connect('localhost','root','', 'loginapp');
if($connection) {
echo "We are connect";
} else {
die ("Database connection faild");
}
//
// if($username && $password ){
// echo $username;
// echo $password;
// } else {
// echo "this field cannot be blank";
// }
//
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" >
</head>
<body>
<div class="conatiner">
<h1>Login</h1>
<div class="col-sm-6">
<form action="login.php" method="post">
<div class="from-group">
<label for="username">Username</label>
<input type="text" name="username" class="form-control">
</div>
<div class="from-group">
<label for="password">Password</label>
<input type="password" name="password" class="form-control">
</div>
<input class="btn btn-primary" type="submit" name ="submit" value="submit"></input>
</form>
</div>
</div>
</body>
</html>