-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRetrievePassword.php
More file actions
54 lines (47 loc) · 1.89 KB
/
RetrievePassword.php
File metadata and controls
54 lines (47 loc) · 1.89 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
<?php
$Username = $_REQUEST["Username"];
$Recovery = $_REQUEST["Recovery"];
$Email = $_REQUEST["Email"];
$con = new mysqli("fdb21.awardspace.net", "2720660_convergencetcg", "Cheeseman1", "2720660_convergencetcg");
$sql = "SELECT * FROM Login WHERE `Username` = '".$Username."'";
$result = mysqli_query($con, $sql);
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_assoc($result))
{
if($row['RecoveryString'] == $Recovery)
{
$Password = $row['Password'];
$myJSON = '{
"Response" : "Success",
"Password" : "'.$Password.'"
}';
echo $myJSON;
die();
}
else
if($row['PlayerEmail'] == $Email)
{
$Password = $row['Password'];
$myJSON = '{
"Response" : "Success",
"Password" : "'.$Password.'"
}';
echo $myJSON;
die();
}
else
$myJSON = '{
"Response" : "PleaseProvideAdditionalInformation"
}';
echo $myJSON;
die();
}
}
else
$myJSON = '{
"Response" : "UsernameNotFound"
}';
echo $myJSON;
die();
?>