[eluser]face1m[/eluser]
I am following the second video tutorial on creating a blog. All of the code has worked up to this point. But i can not find the cause of this error. See code below. thanks in advance for your help. I'm using php 5
rick
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$title?></title>
</head>
<body>
<h1><?=$heading?></h1>
<?php foreach ( $this->result() as $row ): ?>
<h3><?=$row->title?></h3>
<p><?=$row->body?></p>
<hr />
<?php endforeach; ?>
------------------------------------------------------------------------
<?php
class Blog extends Controller {
function __construct()
{
parent::Controller();
}
function index()
{
$data['title'] = 'My Blog Title';
$data['heading'] = 'My Blog Heading one';
$data['query'] = $this->db->get('enteries');
$this->load->view('blog_viewer', $data);
}
}
?>
</body>
</html>