[eluser]Unknown[/eluser]
Hi All,
I am working my way through the 20 min tutorial and have a problem that I cannot solve.
The form helper does not seem to be working.
Here is my view
Code:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1><?php echo $heading; ?></h1>
<?php form_open('blog/comment_insert'); ?>
<?php form_hidden('entry_id', $this->uri->segment(3)); ?>
<p><textarea nasme-"body" rows="10"></textarea></p>
<p><input type="text" name="author" /></p>
<p><input type="submit" value="Submit Comment" /></p>
</form>
</body>
</html>
Here is my controller
Code:
<?php
class Blog extends Controller {
function Blog()
{
parent::Controller();
$this->load->helper('url');
$this->load->helper('form');
}
function index()
{
$data['title'] = 'My BLog Title';
$data['heading'] = 'My Blog Heading';
$data['query'] = $this->db->get('entries');
$this->load->view('blog_view', $data);
}
function comments()
{
$data['title'] = 'My Comment Title';
$data['heading'] = 'My Comment Heading';
$this->load->view('comment_view', $data);
}
function comment_insert()
{
echo "testing...";
}
}
?>
When I view my page I do not get a form opening tag or the hidden field. I checked and the file form_helper.php exists under System/Helpers.
Can anyone see my mistake?
Thanks,
DDetto