how can i use rand to genrate a minimum 7 digit id number???
Posted: Thu Oct 11, 2007 1:26 am
Hi friends....
i want to give a unique no. id to my site's user .. for this i used the rand() function of php like this->
here the $work_id generating a four digit no .. but the problem is that , some times it gives same id for two users randomly like 3439,3439 same for two users ..
how can i generate unique id for all of my users .... please help me...
Thanks !
i want to give a unique no. id to my site's user .. for this i used the rand() function of php like this->
Code: Select all
$work_id = rand(1,9).rand(2,9).rand(3,9).rand(4,9);how can i generate unique id for all of my users .... please help me...
Thanks !