For some reason I can't get forms to post in Codeigniter 2.1.4, I honestly have no clue where I am going wrong. Can anyone see any obvious problems? No post data is returned just an empty form the vardump returns (boolean false)
public function testpost()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
var_dump($this->input->post());
$this->form_validation->set_rules('testt', 'Test', 'required');
if ($this->form_validation->run() == FALSE)
{
echo validation_errors();
echo form_open('test/testpost');
echo form_input(array('type'=>'text', 'id'=>'testt'));
echo form_submit(array('value' => 'submit'));
echo form_close();
}
else
{
echo "true";
}
}
You did not create name of text field.
echo form_input(array('type'=>'text', 'id'=>'testt', 'name'=>'testt'));