Problems with PHP iterative validation
I now want to do a user registration of things, but users and passwords do not need the user to fill out, is the system generated I wrote a function, with Mt_rand do, so afraid of repetition, in the class inside wrote a static method, can be used, myclass::chkeuser verification, See is not already have this user name password, but I think the value of verification once, not, if Next, or repeat it, is not the verification, no repetition so far, think of the iteration, but how to write, the head blurred, ask you heroes?
Share to:
------Solution--------------------
First go to the database to insert the user, get the user unique ID, and then the user equals User+id value, directly with the user ID confusion generated.
For example, user ID = 3090, the user name is user3090, and the password is MD5 (' One of your private keys '. 3090) So it certainly won't repeat
------Solution--------------------
I don't know what you're trying to verify. It's okay to repeat the password.
User authentication is not a select? Get the number, >0, repeat.
What's the next point? The next random value? Put all the user names put into the array, inarray do not discriminate, not iterative AH