diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-02 13:43:55 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-02 13:43:55 +0200 |
commit | 9d0e61768acc8eb6adfd032cdc6fbeac4c024598 (patch) | |
tree | bdc742b40ee0441965f4e8c8f5cd73c79592e7d0 /system/helpers/form_helper.php | |
parent | 197416513977ae65230cc5bf443a165ba793f8ef (diff) |
Added is_cli_request() method to documentation for Input class.
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r-- | system/helpers/form_helper.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 532309794..8aa788c6c 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -49,11 +49,15 @@ if ( ! function_exists('form_open')) $attributes = 'method="post"'; } + // If an action is not a full URL then turn it into one if ($action && strpos($action, '://') === FALSE) { $action = $CI->config->site_url($action); } + // If no action is provided then set to the current url + $action OR $action = $CI->config->site_url($CI->uri->uri_string()); + $form = '<form action="'.$action.'"'; $form .= _attributes_to_string($attributes, TRUE); |