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)
Any help would be appreciated.
asked Nov 28, 2012 at 21:09
user798774
4232 gold badges8 silver badges20 bronze badges
-
Can you show what that markup looks like rendered? Are your values being set? Can't tell if that's a snippet of PHP, smarty, or some other framework. Fiddler can be a great tool to trouble shoot these things, and of course there is firebug... Get you past the $_POST being empty at least.ficuscr– ficuscr2012年11月28日 21:11:34 +00:00Commented Nov 28, 2012 at 21:11
1 Answer 1
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.
Sign up to request clarification or add additional context in comments.
1 Comment
user798774
thanks can't belive i missed it, been banging my head against it for an hour.
lang-php