diff --git a/form.php b/form.php index 9607c97..0dae6fd 100644 --- a/form.php +++ b/form.php @@ -87,6 +87,15 @@ class form return $this; } + /** Set the method + * @param string $val The method to use + */ + public function method ($val) + { + $this->method = strtolower ($val); + return $this; + } + /** Set the csrf token name * @param integer $val The csrf token name */ @@ -224,7 +233,7 @@ class form "Unknown FORM method (GET or POST allowed)")); } - if (count ($values) !== 0) + if (count ($values) !== 0 && $this->csrf === true) { // CSRF protection try