Prevent multi submit PHP
问题 I am seeking a way to prevent multi form submit. I have a form, for example chat.php and its POST action on different file, eg submitter.php. I've tried to implement the solution with the unique token using $_SESSION. chat had a unique $_SESSION[token] and submitter had the if $_POST[token]==$_SESSION[token] My problem is that it didn't work if I had multiple windows opened. Guess the application is a chat script where users can chat on multiple windows, like chat.php?user=5, chat.php?user=10