summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-08-27 03:52:51 +0200
committeradmin <devnull@localhost>2006-08-27 03:52:51 +0200
commit141808ad31d4eefad4c6c3dbaf8306fac2342668 (patch)
tree25c40e5e4e18fb27bb2826ac6ce8fbffd844281c /system/helpers
parentb071bb5a92aade551345a495fb13f5678f3978d0 (diff)
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/form_helper.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index d4e45a0af..069101063 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -38,11 +38,16 @@
* @param array a key/value pair hidden data
* @return string
*/
-function form_open($action, $attributes = array(), $hidden = array())
+function form_open($action = '', $attributes = array(), $hidden = array())
{
$obj =& get_instance();
- $form = '<form method="post" action="'.$obj->config->site_url($action).'"';
+ $form = '<form action="'.$obj->config->site_url($action).'"';
+
+ if ( ! isset($attributes['method']))
+ {
+ $form .= ' method="post"';
+ }
if (is_array($attributes) AND count($attributes) > 0)
{