Welcome Guest, Not a member yet? Register   Sign In
form open
#1

I have a question will form open always using post method?

For example:

echo form_open('email/send');

the same thing like:  <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send">

What if I want to use get method?
" If I looks more intelligence please increase my reputation."
Reply
#2

(This post was last modified: 05-08-2018, 11:23 PM by neuron.)

In system/helpers/form_helper.php:
PHP Code:
    function form_open($action ''$attributes = array(), $hidden = array())
    {

//some codes here
        
$attributes _attributes_to_string($attributes);

        if (
stripos($attributes'method=') === FALSE)
        {
            
$attributes .= ' method="post"';
        }


//some codes here

    


As you can see you can set method using $attributes array
Reply




Theme © iAndrew 2016 - Forum software by © MyBB