stuart7398 Posted April 15, 2008 Share Posted April 15, 2008 Hi. I have a small registration / login form. Is it possible to limit the user to only one registration? if so where do i start? Thanks for your time. Stuart. Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/ Share on other sites More sharing options...
soycharliente Posted April 15, 2008 Share Posted April 15, 2008 One way is to check to see if the username is already taken or not. If it is, error message. You could log someone's IP address and not allow them to even see the registration page, but then if they went to another computer they could do it. These suggestions don't stop someone fully, but mostly just detour the average user. In general, do you think people will try to sign up for more than one account on the site you're trying to make? What does the site do? Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/#findComment-517266 Share on other sites More sharing options...
Northern Flame Posted April 15, 2008 Share Posted April 15, 2008 you can set a cookie after the user registers using one form, and if they attempt to register again, just check for the cookie, and if its set, that means they've registered, if not, then let them register. Hope that makes sense. Good Luck Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/#findComment-517267 Share on other sites More sharing options...
soycharliente Posted April 15, 2008 Share Posted April 15, 2008 Cookie is great way as well. I forgot to mention it in my post. I'm glad someone did. Most users allow all cookies. I myself, don't, but that's just me. Again, even cookies aren't full proof, but just detour the average user. Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/#findComment-517272 Share on other sites More sharing options...
benphp Posted April 15, 2008 Share Posted April 15, 2008 use session and cookie. If you don't want to do that, you can query a user table for each page that checks for IP address - which only works while the person's IP address doesn't change. I prefer validating on email address, because it's something they always remember, it's always unique, and you're going to ask for it anyway. Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/#findComment-517279 Share on other sites More sharing options...
soycharliente Posted April 15, 2008 Share Posted April 15, 2008 For registration, I always check that the email address and the username they gave aren't already in use (even though both are unique in the db anyway) so I don't get unwanted MySQL errors. Link to comment https://forums.phpfreaks.com/topic/101140-multiple-registrations/#findComment-517334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.