Restricting to ip address is a bad way to go many people have dynamic Ips that are always changing there is no real sure fire way to prevent multiple votes unless you are going to require them to...
Why still use the mysql set of functions? you really should be using either mysqli or PDO even php.net suggest this as to they have plans on taking the mysql set of functions out completely in...
Somethings you may wanna look at when filtering form data is rather your using a database or not, personally id create a nifty little function like this