am currently running an open voting system with no login form. I wanted to restrict double voting using user IP Addresses, how can I record user addresses direct to my database and use them to restrict double voting?
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question does not appear to belong here. Either it's not database-related or it otherwise conflicts with the scope of our site. See What topics can I ask about here?, What types of questions should I avoid asking? or this blog post for more info." – mustaccio, MDCCL, hot2use, Philᵀᴹ, Marian
The webserver exposes it as a variable to PHP like this SO answer. PHP can then use that to insert into the database.
Given the scale of NAT usage as one of the factors where legitimate two votes from same IP could occur, I suggest setting a cookie on the browser as an anti-duplicate mechanism.