kawai84 Posted October 25, 2008 Share Posted October 25, 2008 hi, i'm totally a newbie in php... i hope someone will help me with this problem... actually,i want a script that system will generate password for registered user automatically..and after generated, it will send an email to the user that displayed that password. and the user will login using that password.... can anyone help/guide me? please.... Link to comment https://forums.phpfreaks.com/topic/130063-help-how-to-randomly-generate-password-for-user-and-send-email-to-user/ Share on other sites More sharing options...
dropfaith Posted October 25, 2008 Share Posted October 25, 2008 you want an entire log in system with email act? i suggest this http://www.ineedtutorials.com/articles/complete-advanced-login-member-system-php-tutorial then if you run into issues come here and ask for help this isnt a small project anyone will write out for you Link to comment https://forums.phpfreaks.com/topic/130063-help-how-to-randomly-generate-password-for-user-and-send-email-to-user/#findComment-674377 Share on other sites More sharing options...
kawai84 Posted October 25, 2008 Author Share Posted October 25, 2008 actually i just want to know how to do a simple password generator. because for my system, the user just need to enter username and email in registration form... then admin will approve it and the system will generate the password for that user... admin will send the password to the user's email...then, user just login with that password... btw, thanks for that link.. Link to comment https://forums.phpfreaks.com/topic/130063-help-how-to-randomly-generate-password-for-user-and-send-email-to-user/#findComment-674418 Share on other sites More sharing options...
laffin Posted November 4, 2008 Share Posted November 4, 2008 U can generate a password a number of ways. lets try a simple one eh function generatepw($length = 6) { $allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-+="; $password=''; for($i=0;$i<$length;$i++) $password .= substr($allowed,rand(0,strlen($allowed)-1),1); return $password; } very simple method Link to comment https://forums.phpfreaks.com/topic/130063-help-how-to-randomly-generate-password-for-user-and-send-email-to-user/#findComment-681684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.