So I have a voting website I am putting up and I have an external php script that runs a check on the votes before it inserts them. This is to try to make sure votes are not from a bot or script or something like that. Basically what I do is store all of the votes into a temporary votes table then run checks on them. I have a column called good which defaults to 'y'. Once there are 500 votes in this table I want to run my validator on it. It set's the value of good to 'b' on any vote that fails my checks. Then, I insert all of the votes with a value of 'y' to a good votes table and any votes with a value of 'b' into a bad votes table. What my question is, how can I execute my inserter.php script on 500 votes but not make the user wait. The psuedo is like this
if(the user clicks the vote button){
if(there are more than 500 votes){
//i want to run my inserter file
//but not make the user wait on it for their
//output i.e. thanks for voting
runMyInserter();
}//if there are more than 500 votes
}//if the user clicks the button