[eluser]obiron2[/eluser]
Hi guys this is driving me mad.
View code
Code:
<? echo form_open('/zzz');?>
<? echo form_input('testtext');?>
<? echo form_submit('submit','send');?>
<? echo form_close();?>
generates the following html
Code:
<form action="//localhost/ci/index.php/zzz" method="post" accept-charset="utf-8">
<input type="text" name="testtext" value="" />
<input type="submit" name="submit" value="send" />
</form>
Controller zzz
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class zzz extends CI_controller
{
function index()
{
if (isset($this->input->post['testtext']))
{
echo $this->input->post['testtext'];
}
else
{
echo "no post value";
}
}
}
config file has base_url set to "//localhost/ci/"
Index file set to "index.php"
The controller is being called but not passing the isset test and just gives me the no post value. I can't see what I am doing wrong.