[eluser]JPrieto[/eluser]
[quote author="SpooF" date="1243589405"]
If you want I can setup and entire codeigniter installation that works on my system and then send it to you with detailed instruction on how to set it up.
[/quote]
no, no -- that would be abusing your generosity
i don't want you to do all that work for me
but i am very humbled by your sincerity in helping me
here are the files code
===========================
controller blog.php
============================
Code:
<?php
Class Blog extends Controller
{
Function Blog()
{
parent::Controller();
}
Function index()
{
$data['title']= "My Blog Title";
$data['heading']= "My Blog Heading";
$data['query']= $this->db->get('entries');
$this->load->view('blog_view',$data);
}
}
?>
=========================
views file blog_view.php
=========================
Code:
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1> <?php echo $heading; ?> </h1>
<?php foreach($query->result() as $row ): ?>
<h3><?php echo $row->title; ?></h3>
<p><?php echo $row->body; ?></p>
<hr>
<?php endforeach; ?>
</body>
</html>
==========================================
error message displayed in my browser
===========================================
...............................................................
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: query
Filename: views/blog_view.php
Line Number: 8
..................................................................
Fatal error: Call to a member function result() on a non-object in
C:\wamp\www\codeigniter\system\application\views\blog_view.php on line 8
======================
line 8
========================
Code:
<?php foreach($query->result() as $row ): ?>
.............. and that's it
what do you think?