How to make sure that at the end of registration a text message about the confirmation of the password and login has come to the e-mail, and after confirming the password and login has come to the site?

  • one
    letters come to the post office, not sms)) - Gorets
  • "sms" - "by mail"? What is it like? - Sergiks
  • exactly a letter, not SMS)) - Sasha Osipov

2 answers 2

Like that. In regulation:

mail($to, 'Подтверждение регистрации на сайте ', "Подтвердите ваш аккаунт, нажав на <a href=\"{$to}\">эту ссылку</a>"); 


 $password = 'password'; // генерируем пароль mysql_query("UPDATE `users` SET `confirmed` = 1, `password` = '{$password}' WHERE `email` = '{$_GET[email]}'"); mail($_GET['email'], 'Ваши регистрационные данные от ', "Ваш пароль: {$password}"); 

And do not forget about security. In general, read this .

  • Stop, but I do not need to generate! - Sasha Osipov
  • But if the user entered the password himself, then he should have known it, and it is not necessary to send it :) And if we consider the possibility of users with amnesia, then we confirm SELECT in confirm.php, save the password in $ password and send it to the same mail to which it is attached. - Shevsky

:) But if you want to notify the client about the successful registration via SMS, connect the mobile phone to the server and transfer the AT commands to the phone programmatically (work with the COM port), which will automatically send SMS. Naturally, when registering, a visitor to your site must enter your number, and you, in turn, must check the number.