rkiss
Posts: 14
|
Posted: 07/20/2004, 9:45 AM |
|
Hi,
I was wondering if someone has developed a php code that automatically generates username and password for users during registration.
Any kind of help would be appreciated
Thank You
Roman
|
|
|
Roman
|
Posted: 07/22/2004, 1:57 PM |
|
Hi,
Does anyone have some tips for me for this task?
Thank You
Roman
|
|
|
carolcastro
Posts: 24
|
Posted: 07/23/2004, 12:58 PM |
|
I have a function that generates a password, you could adapt to generate usernames.
Here it is:
function GeraSenha()
{
$caracteres= '0123456789'; // default 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$numch=4; //default = 8
$senha='';
for($i=0;$i<$numch;$i++) {
$senha.=$caracteres[rand(0,strlen($caracteres)-1)];
}
return $senha;
}
_________________
Carol Castro |
|
|
Roman
|
Posted: 07/26/2004, 7:37 AM |
|
Carol,
Thank you for your reply
Regards
Roman
|
|
|
|