diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-10 17:38:32 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-10 17:38:32 +0100 |
commit | 133beafd1746b0f5fa06794fd183289d43defdbe (patch) | |
tree | 7a285b077e72591d7e8169356811d67f036be189 /system | |
parent | 0e3263b44d2762894588ff3e682579ec0cb77fa0 (diff) |
Changed the logic for form_open() in Form helper. If no value is passed it will submit to the current URL.
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/form_helper.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 758056b50..8ed520f5d 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -49,7 +49,10 @@ if ( ! function_exists('form_open')) $attributes = 'method="post"'; } - $action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action; + if ($action && strpos($action, '://') === FALSE) + { + $CI->config->site_url($action); + } $form = '<form action="'.$action.'"'; |