checkSubmitOnce

Description

Checks whether or not a form has been submitted more than once.

Syntax

bool checkSubmitOnce (string $action[, bool $is_fatal])



Parameter $action

Expected type: Enumerated String
Description: Indicates what to do

Possible string values
Allowed values Description
'check' Checks a specific sequence number and deletes it from the stack after it's been checked
'free' Frees a sequence number without checking it
'register' Registers a specific sequence number



Parameter $is_fatal

Expected type: Boolean
Description: If true, the function will die with a fatal_lang_error if the form has already been submitted. Otherwise it will return false if there's a problem or true otherwise. Default is true.



Return value

Expected type: Boolean
Description: If is_fatal is false, returns true if the form has only been submitted once or false otherwise.


Notes

  • Registers a sequence number for a form.
  • Checks whether a submitted sequence number is registered in the current session.
  • Depending on the value of is_fatal shows an error or returns true or false.
  • Frees a sequence number from the stack after it's been checked.
  • Frees a sequence number without checking if action == 'free'.
  • Sequence number specified in $_REQUEST['seqnum']
Advertisement: