mirror of
https://github.com/PhantomGamesDevelopment/PGD-Connect--Tribes-2-.git
synced 2026-07-16 00:34:42 +00:00
Initial Commit
This commit is contained in:
commit
75b8614a44
421 changed files with 36000 additions and 0 deletions
37
Univ/PasswordSend.php
Normal file
37
Univ/PasswordSend.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
$get = $_POST["email"];
|
||||
if(!$get) {
|
||||
die("Whoops! you forgot to enter the email address!");
|
||||
}
|
||||
$goto= str_replace('@', 'at', $get);
|
||||
|
||||
$con = mysql_connect("localhost","","");
|
||||
if (!$con) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
}
|
||||
mysql_select_db("phantom7_PGDConnect", $con);
|
||||
|
||||
$result = mysql_query("SELECT * FROM Data WHERE email='$goto'");
|
||||
if (!$result)
|
||||
echo "Query failed! " . mysql_error();
|
||||
|
||||
while($row1 = mysql_fetch_array($result)) {
|
||||
$match1 = $row1[email];
|
||||
$code = $row1[password];
|
||||
}
|
||||
|
||||
if(!$match1) {
|
||||
die("I'm afraid that email address is not in our database, please register!");
|
||||
}
|
||||
|
||||
$to = $get;
|
||||
$from = "no-reply@phantomdev.net";
|
||||
$subject = "PGD Connect Passcode";
|
||||
$body = "Hello \n We have recieved a passcode delivery request \n This is your PGD Code: ".$code.".";
|
||||
if (mail($to, $subject, $body,"From:".$from."")) {
|
||||
echo("<p>Message successfully sent!</p>");
|
||||
}
|
||||
else {
|
||||
echo("<p>Message delivery failed...</p>");
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue