Re: [PHP-WIN] Random Code

2001-01-23 Thread Sigurd Magnusson
.A.T. " <[EMAIL PROTECTED]> To: "Sigurd Magnusson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 24, 2001 8:55 AM Subject: RE: [PHP-WIN] Random Code > Indeed a very interesting question you put forward (and probably OOT too :-) > > In p

[PHP-WIN] Random Code

2001-01-23 Thread Sigurd Magnusson
Whats the best way to make a completely random, unique code in the format "ABCD-1234" where each of the 8 characters can be alphanumerc; 0-9,A-Z... I thought about generating a 36^4 number, converting to to base '36', and repeating the process. What's a good way to ensure the code is not repeat