So, on my game, you signup, you get an e-mail, however, I want it so you get an activation code, and then enter it into a box, and your registered...
So, they signup, they get the activation code
they type it in, and it finishes the signup...
so, how would I tell if its there first time logging in? and if the activation code is right O_O (and how would I make the activation code lolz, I was fiddling around with the uniqid() thing, that creates a unique id... but im not sure
( and how would I make sure its different each time
Activation code, how would I make a different one each time
Moderator: General Moderators
-
Mythic Fr0st
- Forum Contributor
- Posts: 137
- Joined: Sat Dec 02, 2006 3:23 am
- Contact:
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Have a separate account confirmation page.so, how would I tell if its there first time logging in?
Store the code in the db and match it to the user's email addressand if the activation code is right O_O
Keep your salt hidden:and how would I make the activation code
Code: Select all
$salt = 'somestring';
$uniqueId = md5($salt . time());- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
another idea is to combine the username with the MySQL InsertRowId in an MD5 hash.
The insertRowId would be private to your database (therefore difficult or impossible to guess from the outside) and it gives you don't have to cache the MD5 hash, since you can recreate it on the fly.
hehe - cache the hash.... I need to get out more
Kieran
The insertRowId would be private to your database (therefore difficult or impossible to guess from the outside) and it gives you don't have to cache the MD5 hash, since you can recreate it on the fly.
hehe - cache the hash.... I need to get out more
Kieran
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK