Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // print
- //generates and prints a random number between on and one million
- $email_from= $_GET['email_from'];
- $subject = $_GET['subject'];
- $message = $_GET['message'];
- $user = $_GET['user'];
- $con = mysql_connect("mysql4.000webhost.com", "a7212342_gm", "password1234");
- if(!$con)
- {
- echo("Server Connection Failure!");
- die;
- }
- else
- {
- mysql_select_db(a7212342_gm);
- $randnum = rand(1, 1000000);
- $command = "UPDATE users SET Password='" . $randnum . "' WHERE Username='" . $user . "'";
- mysql_query(stripslashes($command)) or die(mysql_error());
- $query = "SELECT Email, Password FROM users WHERE Username='" . $user . "'";
- $result = mysql_query($query) or die(mysql_error());
- while ($row = mysql_fetch_assoc($result)) {
- // echo $row["Email"];
- // mail( $row["Email"], "Subject: " . $subject, $message . "\r\nNew Password: " . $row["Password"], "\r\nFrom: $email_from" );
- mail( $row["Email"], "Subject: " . $subject, $message . "\r\nNew Password: " . $row["Password"], "From: admin@downloadmanager.sourcemegamod.co.cc" );
- }
- mysql_free_result($result);
- $command2 = "UPDATE users SET Password='" . MD5($randnum) . "' WHERE Username='" . $user . "'";
- mysql_query(stripslashes($command2)) or die(mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement