-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
96 lines (72 loc) · 3.4 KB
/
index.php
File metadata and controls
96 lines (72 loc) · 3.4 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
include("config.php");
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
// username and password sent from form
$myusername = mysqli_real_escape_string($db,$_POST['username']);
$mypassword = mysqli_real_escape_string($db,$_POST['password']);
$sql = "SELECT * FROM Clinician WHERE Email = '$myusername'";
$result = mysqli_query($db,$sql);
$row = mysqli_fetch_array($result,MYSQLI_ASSOC);
$hash = $row['Password'];
$active = $row['Active'];
if (password_verify($mypassword, $hash)) {
session_start("myusername");
$_SESSION['login_user'] = $myusername;
header("location: welcome.php");
} else {
$error = "Your Login Name or Password is invalid";
}
}
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>NEU SLHC | Home</title>
<!-- Bootstrap core CSS-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS files -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Sticky Footer CSS -->
<link href="css/sticky-footer.css" rel="stylesheet">
<!-- Personal Custom styles -->
<link href="css/custom.css" rel="stylesheet">
<!-- Favicon -->
<link rel="icon" href="https://bouve.northeastern.edu/assets/uploads/2014/05/favicon.png">
<!-- Custom styles for this template -->
<link href="signin.css" rel="stylesheet">
</head>
<body>
<!-- Top of Page Navigation Panel-->
<header>
<nav class="navbar navbar-custom navbar-fixed-top" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand">Northeastern University | Speech-Language & Hearing Center <span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>
</div>
</div><!-- /.container-fluid -->
</nav>
</header>
<!-- BEGIN PAGE CONTENT -->
<!-- Main component for a primary marketing message or call to action -->
<div class="container">
<form class="form-signin" method="post">
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" name="username" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required>
<div style = "font-size:14px; color:#cc0000; margin-top:10px"><?php echo $error; ?></div>
<button class="btn btn-lg btn-primary btn-block" type="submit"'>Sign in</button>
</form>
</div> <!-- /container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>