[Solved] how to save ip address in database [closed]


You can capture ip address by

$_SERVER['REMOTE_ADDR'];

every time if an user clicks on vote, first capture ipaddress. then run a query like select * from table where ipaddress = "current ip address" and question number = some id and time difference >= 3 hours if ip address is present, then user has answered, else increment the votes.

0

solved how to save ip address in database [closed]