Need some help stopping multiple signups.. php/mssql
Posted: Mon Apr 21, 2014 12:15 pm
It's been a couple years now since I've worked on website on a daily basic.. I thought you could never really forget how to program, but I am running a small project now and I am moreless confused on how to fix an issue..
I have a simple signup page requesting a username, password, password2 and email. I currently check only to see if the username exists and show an error if it does.
What I need to do is to also added new hidden fields for IP, calling $_SERVER['REMOTE_ADDR'] which I can do. I basically need a way to check to make sure accounts can not be made from the same user. I know people can change their IP with software and still, in some cases the ip can be dynamic. But I really need to stop additional registrations..
This is the problem I'm having on the signup page, and I also have a simple page for my game, where you use can request a set amount of coins daily, but still, the request script needs a way to only be used by one UserName, whether they have multiple accounts or not.
EDIT: Not sure if it makes a difference, but the coin request, I'm trying to set up to be allowed once per day after 8Am, I can set a field to 1 if they already requests coins, but i'm not sure whats best to check. Compare the date/time and if 24 hours has past, set the field back to 0 and then 1 again when they submit again? I'm probably making this more complicated than it is.. Setting a field 1 would stick whether the user changed their IP address? Would that work too?
If anyone can point me in the right direction, I would definitely appreciate it..
Chris
I have a simple signup page requesting a username, password, password2 and email. I currently check only to see if the username exists and show an error if it does.
What I need to do is to also added new hidden fields for IP, calling $_SERVER['REMOTE_ADDR'] which I can do. I basically need a way to check to make sure accounts can not be made from the same user. I know people can change their IP with software and still, in some cases the ip can be dynamic. But I really need to stop additional registrations..
This is the problem I'm having on the signup page, and I also have a simple page for my game, where you use can request a set amount of coins daily, but still, the request script needs a way to only be used by one UserName, whether they have multiple accounts or not.
EDIT: Not sure if it makes a difference, but the coin request, I'm trying to set up to be allowed once per day after 8Am, I can set a field to 1 if they already requests coins, but i'm not sure whats best to check. Compare the date/time and if 24 hours has past, set the field back to 0 and then 1 again when they submit again? I'm probably making this more complicated than it is.. Setting a field 1 would stick whether the user changed their IP address? Would that work too?
If anyone can point me in the right direction, I would definitely appreciate it..
Chris