add an extra field into the db called, vote_ip
then when the user registers a vote change the sql query to:
INSERT INTO blahblah (blah, blah, blah, vote_ip) VALUES ('$blah', '$blah', '$blah', '".$_SERVER['REMOTE_ADDR']."')
that will add the users ip into the database
then before that sql query you need to put this:
$checkip = mysql_query("SELECT vote_ip FROM tablename WHERE vote_ip='".$_SERVER['REMOTE_ADDR']."' AND vote_id='$currentvote' ") or die(mysql_error());
$checkip = mysql_num_rows($checkip);
if ($checkip > 0) {
echo "You have already voted for this vote!";
} else {
//run add to vote table query
}
$currentvote is the id of the vote that the user is viewing, since we only want one ip per vote and not one ip for all the votes available in the table