0) { foreach ($array as $index=>$value) { if (is_array($array[$index])) { sqstripslashes($array[$index]); } else { $array[$index] = stripslashes($value); } } } } /** * Add a variable to the session. * @param mixed $var the variable to register * @param string $name the name to refer to this variable * @return void */ function sqsession_register ($var, $name) { sqsession_is_active(); $_SESSION[$name] = $var; } /** * Delete a variable from the session. * @param string $name the name of the var to delete * @return void */ function sqsession_unregister ($name) { sqsession_is_active(); unset($_SESSION[$name]); session_unregister("$name"); } /** * Checks to see if a variable has already been registered * in the session. * @param string $name the name of the var to check * @return bool whether the var has been registered */ function sqsession_is_registered ($name) { $test_name = &$name; $result = false; if (isset($_SESSION[$test_name])) { $result = true; } return $result; } /** * Retrieves a form variable, from a set of possible similarly named * form variables, based on finding a different, single field. This * is intended to allow more than one same-named inputs in a single *