-
Notifications
You must be signed in to change notification settings - Fork 0
/
uyegirissonuc.php
46 lines (40 loc) · 1.23 KB
/
uyegirissonuc.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
<?php
if(isset($_POST["EmailAdresi"])){
$GelenEmailAdresi = Guvenlik($_POST["EmailAdresi"]);
}else{
$GelenEmailAdresi = "";
}
if(isset($_POST["Sifre"])){
$GelenSifre = Guvenlik($_POST["Sifre"]);
}else{
$GelenSifre = "";
}
$MD5liSifre = md5($GelenSifre);
if(($GelenEmailAdresi!="") and ($GelenSifre!="")){
$KontrolSorgusu = $VeritabaniBaglantisi->prepare("SELECT * FROM uyeler WHERE EmailAdresi = ? AND Sifre = ? and SilinmeDurumu = ?");
$KontrolSorgusu->execute([$GelenEmailAdresi, $MD5liSifre, 0]);
$KullaniciSayisi = $KontrolSorgusu->rowCount();
$KullaniciKaydi = $KontrolSorgusu->fetch(PDO::FETCH_ASSOC);
if($KullaniciSayisi>0){
if($KullaniciKaydi["Durumu"]==0){
$_SESSION["Kullanici"] = $GelenEmailAdresi;
if($_SESSION["Kullanici"]==$GelenEmailAdresi){
header("Location:index.php?SK=50");
exit();
}else{
header("Location:index.php?SK=33");
exit();
}
}else{
header("Location:index.php?SK=33");
exit();
}
}else{
header("Location:index.php?SK=34");
exit();
}
}else{
header("Location:index.php?SK=35");
exit();
}
?>