Brimbox Logo Brimbox Version 2.3.4 Released


Method to process a postback or form submit. Method has a waterfall; first it uses the default value, then if state is set it overwrites that value with saved state value, and finally if $POST form variable is set it uses that value instead. Form variable and state array associative key must have the same name.

Class: bb_work, called as $main

File: bb_work.php (php)


function process($name, $module, &$arr_state, $default = "")


$value = $main->process($name, $module, $arr_state, $default);

global $POST

Returns: final value from method waterfall or default, empty string if default not set.

Note: $arr_state passed as a value and updated.

Parameter: $name (string)
Name of the state associative array key and form variable, must be the same.

Parameter: $module (string)
Module to check for $POST variable, usually the current module.

Parameter: $arr_state (array)
PHP array to be referenced and updated during processing.

Parameter: $default (optional string)
Value to be returned and added to the $arr_state array if state and $POST form variable not set.

Updated: 2016-07-08