$con = mysql_connect("localhost","user"); mysql_db_query("db","update table set cant_voto=cant_voto++ where voto=voto2"); mysql_close($con);