-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateNewPasswordControl.php
More file actions
55 lines (48 loc) · 1.42 KB
/
CreateNewPasswordControl.php
File metadata and controls
55 lines (48 loc) · 1.42 KB
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
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'Lib/PHPMailer/src/Exception.php';
require 'Lib/PHPMailer/src/PHPMailer.php';
require 'Lib/PHPMailer/src/SMTP.php';
if(isset($_GET["EmailAdresi"])){
$GelenEmailAdresi = Guvenlik($_GET["EmailAdresi"]);
}else{
$GelenEmailAdresi = "";
}
if(isset($_GET["AktivasyonKodu"])){
$GelenAktivasyonKodu = Guvenlik($_GET["AktivasyonKodu"]);
}else{
$GelenAktivasyonKodu = "";
}
if(isset($_POST["Sifre"])){
$GelenSifre = Guvenlik($_POST["Sifre"]);
}else{
$GelenSifre = "";
}
if(isset($_POST["SifreTekrar"])){
$GelenSifreTekrar = Guvenlik($_POST["SifreTekrar"]);
}else{
$GelenSifreTekrar = "";
}
$MD5liSifre = md5($GelenSifre);
if(($GelenEmailAdresi!="") and ($GelenAktivasyonKodu!="") and ($GelenSifre!="") and ($GelenSifreTekrar!="")){
if($GelenSifre!=$GelenSifreTekrar){
header("Location:index.php?RC=13");
exit();
}else{
$UyeGuncellemeSorgusu = $VeritabaniBaglantim->prepare("UPDATE uyeler SET Sifre = ? WHERE EmailAdresi = ? AND AktivasyonKodu = ? LIMIT 1");
$UyeGuncellemeSorgusu->execute([$MD5liSifre, $GelenEmailAdresi, $GelenAktivasyonKodu]);
$Kontrol = $UyeGuncellemeSorgusu->rowCount();
if($Kontrol>0){
header("Location:index.php?RC=0");
exit();
}else{
header("Location:index.php?RC=13");
exit();
}
}
}else{
header("Location:index.php?RC=13");
exit();
}
?>