-
Notifications
You must be signed in to change notification settings - Fork 0
/
signin.php
63 lines (49 loc) · 1.75 KB
/
signin.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
<!DOCTYPE html>
<html lang="en" class="mdl-js">
<title>NITW -DoX-</title>
<link rel="stylesheet" media="screen" href="style.css">
</head>
<body>
<?php
require_once 'config.php';
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$email = $_POST['email'];
$password = $_POST['password'];
$forlogin = "select * from registration";
$result = mysql_query($forlogin);
if($flag = true){
while ($row = mysql_fetch_array($result)) {
if($email == $row['email'] && $password == $row['password']) {
$_SESSION['currentuser'] = $user;
header('Location: /pro/dashboard.php');
}
else{
$flag = false;
echo "<script>alert('please enter right crienditail');</script>";
}
}
}
}
?>
<ul>
<li><a class="active" href="index.html">Home</a></li>
<li><a href="#paper">Sampale paper</a></li>
<li><a href="#notes">notes</a></li>
<li><a href="#about">About us</a></li>
<li><a href="signin.php" class="signin">signin</a></li>
<li><a href="signup.php" class="signup">signup</a></li>
</ul><center><br><br></div>
<form action='<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>' method="post">
<div class="log"> <font color=white><h1>Sign in</h1></font>
<div class="cont">
<label class="koko" for="uname"><b>Email      </b></label>
<input type="text" placeholder="Enter Email ID" name="email" required></div><br>
<div class="cont" style="margin-top:5px;">
<label class="koko" for="psd"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
</div><br>
<button style="margin-top: 8px" type="submit" name="submit">Login</button> <a href="signup.php">not register</a>
</div>
</body>
</html>