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?
2 answers
Like that. In regulation:
mail($to, 'Подтверждение регистрации на сайте site.com ', "Подтвердите ваш аккаунт, нажав на <a href=\"http://site.com/confirm.php?email={$to}\">эту ссылку</a>");
confirm.php:
$password = 'password'; // генерируем пароль mysql_query("UPDATE `users` SET `confirmed` = 1, `password` = '{$password}' WHERE `email` = '{$_GET[email]}'"); mail($_GET['email'], 'Ваши регистрационные данные от site.com ', "Ваш пароль: {$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.
|