G
Guest
I want to have 2 types of accounts of which users can use to login through
the site, either a user account that is created through registeration or
login as a guest.
I have no problem with the user accounts, the problem is with guest account,
I want if a user chooses to login as a guest he would be given a random 5
digit id that does not currently exist in the guests table. I don't want to
have the auto increment primary key in guests table, I want it random created
in the page and then inserted in the table.
I can't think of a solution that generates random values that guarantees
that no duplicate values would exist at the same time?
Any one can help me with an idea?
Thanks in advance.
the site, either a user account that is created through registeration or
login as a guest.
I have no problem with the user accounts, the problem is with guest account,
I want if a user chooses to login as a guest he would be given a random 5
digit id that does not currently exist in the guests table. I don't want to
have the auto increment primary key in guests table, I want it random created
in the page and then inserted in the table.
I can't think of a solution that generates random values that guarantees
that no duplicate values would exist at the same time?
Any one can help me with an idea?
Thanks in advance.