I run a script in my order.php file which when an order is confirmed it pushes it through to my supplier to ship.

Once received our supplier will not cancel orders and this becomes a problem if the customer accidently makes two duplicate orders back to back.

As a fail safe I want to add something to my code which will stop it from sending the order through to the supplier if the customer has already placed an order in say the past 5-10 mins.

Can anyone advise what a good php test for this would be?