[eluser]adamfairholm[/eluser]
This one has me scratching my head. I've got a form that is using post to submit some data. Really simple form, just a text field. However, when I submit, nothing happens - just a page refresh.
A quick print_r of the $_POST variable tells me that its not getting anything. It's just an empty array. Same with using the $this->input->post() function.
However, if I make a test.php file outside of the CI structure and do a quick $_POST test, it works as expected.
The CI exclusivity makes me think its not a server config issue, but something to do with CI. Has anyone ever run into this before? I haven't so I'm drawing a blank on where to even start.
Here is the code below. Like I said, it's very simple.
Controller:
Code:
function index()
{
print_r($_POST);
if( isset($_POST) && ! empty($_POST) )
{
//Do some stuff here
}
$this->load->view('placeholder', $this->data);
}
View:
Code:
<form action="<?=$link_url;?>main" method="post">
<p><input type="text" name="email_address" /> <input type="submit" name="Submit" id="submit_button" /></p>
</form>