[eluser]CI_[/eluser]
my redirect() won't fire... please check my codes...
the problem is when I click submit button it goes to another url like sooo
"http://localhost/code_igniter/index.php/blog/index.php/blog/index" as you can see the
URI has been repeated. what did I do wrong here..
Thank you in advance...
Code:
<?Php
class Blog extends Controller {
function Blog()
{
parent::Controller();
$this->load->helper('url');
$this->load->helper('form');
}
function index()
{
$data['title'] = 'My Sample Tutorial';
$data['heading'] = 'This is my Heading';
$data['view_data'] = $this->db->get('tblniel');
$this->load->view('view_blog', $data);
}
function insert_data()
{
$this->db->insert('tblniel',$_POST);
redirect('blog/index');
}
}
?>