-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_giris.php
62 lines (55 loc) · 1.68 KB
/
admin_giris.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
<?php
include "database.php";
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>E-OKUL</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body class="back">
<?php include "ust_kisayol.php";?>
<img src="img/YAVUZLAR-UZUN.jpg" width="800">
<div class="login">
<h1 class="heading">Admin Giriş</h1>
<div class="log">
<?php
if(isset($_POST["login"]))
{
$sql="select * from admin where ANAME='{$_POST["aname"]}' and APASS='{$_POST["apass"]}'";
$res=$db->query($sql);
if($res->num_rows>0)
{
$ro=$res->fetch_assoc();
$_SESSION["AID"]=$ro["AID"];
$_SESSION["ANAME"]=$ro["ANAME"];
echo "<script>window.open('admin_home.php','_self');</script>";
}
else
{
echo "<div class='alert alert-danger'>Yanlış isim veya şifre</div>";
}
}
if(isset($_GET["mes"]))
{
echo "<div class='alert alert-danger'>{$_GET["mes"]}</div>";
}
?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
<div class="form-group">
<label for="aname">İsim</label>
<input type="text" name="aname" required class="form-control" id="aname">
</div>
<div class="form-group">
<label for="apass">Şifre</label>
<input type="password" name="apass" required class="form-control" id="apass">
</div>
<button type="submit" class="btn btn-primary" name="login">Giriş Yap</button>
</form>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
</body>
</html>