var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Random Username Generator
Hi, i 'm trying to create a random username generator that will take the the firstname and last name entered in a form, add them together and place a random 6 digit number on the end.
Any help would be great..........
You can use the timestamp returned from the Time() funtion with fmod() or bcmod() with a dvisor of 1,000,000 to give the remainder (modulo) ######, value for your random number.
$ufname = "French";
$ulname = "Fry";
$randts = bcmod(Time(),1000000);
If you expect very high traffic for username generation you should impliment an flock file or some other method to prevent two exact times being posted.
Thank you very much, it works great.