-
Notifications
You must be signed in to change notification settings - Fork 0
/
uyeolsonuc.php
85 lines (65 loc) · 2.63 KB
/
uyeolsonuc.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
require_once("baglan.php");
if (isset($_POST["kullaniciadi"])) {
$GelenKullaniciAdi = Filtre($_POST["kullaniciadi"]);
} else {
$GelenKullaniciAdi = "";
}
if (isset($_POST["sifre"])) {
$GelenSifre = Filtre($_POST["sifre"]);
} else {
$GelenSifre = "";
}
if (isset($_POST["adsoyad"])) {
$GelenIsimSoyisim = Filtre($_POST["adsoyad"]);
} else {
$GelenIsimSoyisim = "";
}
if (isset($_POST["emailadresi"])) {
$GelenEmailAdresi = Filtre($_POST["emailadresi"]);
} else {
$GelenEmailAdresi = "";
}
$avatar = "images/avatar.svg";
$KontrolSorgusu = $VeriTabaniBaglantisi->prepare("SELECT * FROM members Where kullaniciadi=? OR emailadresi=?");
$KontrolSorgusu->execute([$GelenKullaniciAdi, $GelenEmailAdresi]);
$KontrolSayisi = $KontrolSorgusu->rowCount();
if ($KontrolSayisi > 0) {
?> <div style="height:90vh; width:90vw; box-sizing:border-box; padding:0; margin:0;">
<div style="margin:0; text-align:center;">Aynı kullanıcı adı veya e mail ikinci kez kullanılamaz.</div>
<div style="text-align:center; height:50px; width:50px; padding:0; margin:auto; "><img src="images/fail.svg" alt="Başarısız"></div>
</div>
<?php
echo '<meta http-equiv="refresh" content="2;URL=kayitol.php">';
exit();
} else {
$KayitEkle = $VeriTabaniBaglantisi->prepare("INSERT INTO members (kullaniciadi,sifre,adisoyadi,emailadresi,kayittarihi,avatar) values(?,?,?,?,?,?)");
$KayitEkle->execute([$GelenKullaniciAdi, $GelenSifre, $GelenIsimSoyisim, $GelenEmailAdresi, $ZamanDamgasi, $avatar]);
$KayitKontrol = $KayitEkle->rowCount();
}
if ($KayitKontrol > 0) {
echo '<meta http-equiv="refresh" content="2;URL=main.php">';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<title>Paylaşım Platformu</title>
</head>
<body style="text-align:center;">
<div style="width :auto; height:20px; padding:0; line-height:20px; margin:auto; margin-top:100px ">Kayıt Başarıyla Yapıldı.</div>
<img src="/images/onay.gif" style="width:445px;height:350px; margin:auto;" alt="Başarılı!">
</body>
</html>
<?php
} else {
?> <div style="height:90vh; width:90vw; box-sizing:border-box; padding:0; margin:0;">
<div style="margin:0; text-align:center;">Bir Hata oluştu.</div>
<div style="text-align:center; height:50px; width:50px; padding:0; margin:auto; "><img src="images/fail.svg" alt="Başarısız"></div>
</div>
<?php
}
?>