-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkontrol.php
34 lines (26 loc) · 986 Bytes
/
kontrol.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
<?php
$kullaniciAdiSoyadi = $_POST["kullaniciadisoyadi"];
$kullaniciSifre = $_POST["kullanicisifre"];
include("baglanti.php");
$sqlkomut = "SELECT * FROM admin WHERE kullaniciAdiSoyadi = ? and kullaniciSifre = ?";
$stmt = $baglanti->prepare($sqlkomut);
$stmt->bind_param("ss", $kullaniciAdiSoyadi, $kullaniciSifre);
$stmt->execute();
$islem = $stmt->get_result();
if($islem->num_rows > 0){
$degerler = $islem->fetch_object();
$kAdiSoyadi = $degerler->kullaniciAdiSoyadi;
$kSifre = $degerler->kullaniciSifre;
$kRol = $degerler->kullaniciRol;
session_start();
$_SESSION["kullaniciAdiSoyadi"] = $kAdiSoyadi;
$_SESSION["kullaniciSifre"] = $kSifre;
$_SESSION["kullaniciRol"] = $kRol;
header("location: admingirisi2.php");
}
else{
header("location: admingirisi.php?hata=1");
}
$stmt->close();
$baglanti->close();
?>