I will explain the problem with follwing example:
I have 100 student IDs. For a specific task, only 1 to 25 id numbers (selective students) should allow to self-register via web page. If I keep these 25 valid ID numbers in mysql table in the server database, how could be the login registration php script to allow those particular students to register and for rest, if they try to register, not to accept the registration.
I am trying and trying but not succeeded. Can anyone here guide me to overcome this issue.
Thanks in advance.
This is how I would approach this:
Use PHP 'file_get_contents' and 'file_put_contents' to save the number of users that have registered (1 thru 25). No database needed.
When the login page is loading use that file to determine if the login screen should be shown (if less than 25) or an error message because 25 users have already registered.
If the login screen is shown and the user registers than you need to update the file to show new users registered count.
I can't offer anymore until you show some actual code.
If it is working for you then that is great. However, I see nothing about the first 25 users. As far as I can see, this script doesn't track that count. But you say you've got the solution so OK.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)