[eluser]Master276[/eluser]
Hi Guys,
i'm a newbie and i've got a problem with the anchor function that doesn't work
here is my code
The controller
Code:
<?php
class Blog extends CI_Controller {
public function __Blog(){
parent::__Blog();
$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);
}
}
?>
The view
Code:
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<h1><?=$heading?></h1>
<?php foreach($query->result() as $row): ?>
<h3><?=$row->title?></h3>
<p><?=$row->body?></p>
<?php echo anchor('blog/comments','Comments','title="Nuovo commento"');?>
<hr>
<?php endforeach; ?>
</body>
</html>
do you find any errors?
Thank you
Lorenzo