简体   繁体   中英

Problems getting post data in codeigniter

I'm having problems getting post data from my view. In my controller i currently have the following:

function update()
{
    var_dump($this->input->post('name'));
}

That returns

bool(false)

I have tried

var_dump($_POST);

but that returns an empty array

Here is my view on pastebin(I can't get the format right here)

http://pastebin.com/zJvuDRu4

Any help would be appreciated.

You forgot the attribute name

<td><input type="text" id="name" value="{name}"/></td></tr>

The correct is:

<td><input type="text" id="name" value="{name}" name="name"/></td></tr>

And the others inputs, you have to do the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM