how to restrict registered user from trying to vote twice [closed]

I'm very new to php coding and website designing.

I'm trying to develop an online voting system, where registered users are only allowed to vote. Have done everything and it's working fine, but the help I need is after the user have logged out.

How can I make the user not to be able to login again and vote twice?

Or

How I can I redirect the user the second time?

Answers:

Answer

This is mainly a design question but one method would be setting a flag in the database once a vote has been casted for the user. When the user logs in you would check the flag to see if a vote has been made and redirect accordingly.

The flag can be in the response code or from the response data.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.