Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $connection = mysql_connect("mysql1.ugu.pl","db693194","dupa1234")
- or die('Brak połączenia z serwerem MySQL.<br />Błąd: '.mysql_error());
- mysql_select_db("db693194");
- $email = $_POST['email'];
- if (!empty($email))
- {
- if (strstr($email, "@")!==False)
- {
- $przypomnienie = mysql_query("SELECT EMAIL FROM Uzytkownicy WHERE EMAIL = '$email'" )or die("Błąd Bazy danych!");
- $mail = mysql_fetch_assoc($przypomnienie);
- if ($mail['EMAIL'] == $email)
- {
- $link = 'Witaj'+ $email + 'Jeśli nie pamiętasz swojego hasła kliknij w link poniżej aby ustawić nowe hasło';
- $email_title = "remind password";
- $headers="From: <RANKPORN.UGU.PL>".PHP_EOL;
- $headers.= 'MIME-Version: 1.0' .PHP_EOL;
- $headers.="Content-type: text/html; charset=utf-8".PHP_EOL;
- $headers.="X-Mailer: PHP/". phpversion();
- if(mail($email, $email_title, $link, $headers))
- {
- echo "Link was send at your mail.";
- }
- else echo "email wasn't send";
- }
- else echo $email;
- }
- }
- else echo "Wrong email or email doesnt exist";
- mysql_close($connection);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement