-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminlogin.php
49 lines (45 loc) · 1.33 KB
/
adminlogin.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
<?php
session_start();?>
<?php require("head.php"); ?>
<?php
if(isset($_POST["submit"]))
{
$password=$_POST['pass'];
//$uname=$_POST['uname'];
$email=$_POST['email'];
$sql="SELECT username FROM admin where email='$email' and password='$password'";
$result=mysqli_query($conn,$sql);
$rows=mysqli_fetch_array($result);
if(mysqli_num_rows($result)==1){
$_SESSION["name"] = $rows["username"];
?>
<?php
Redirect("admin.php");
}
}
?>
<div class="flex flex-center ">
<form class="card form " method="POST" action="">
<table>
<tbody>
<tr >
<td >Login Form </td>
</tr>
<tr>
<td>Enter Your Email</td>
<td><input type="email" name="email" id="email" required /></td>
</tr>
<tr>
<td>Enter Your Pass</td>
<td><input type="password" name="pass" id="pass" required /></td>
</tr>
<tr>
<td>Submit</td>
<td>
<input type="submit" name="submit" id="submit">
</td>
</tr>
</tbody>
</table>
</form>
</div>