Welcome Guest, Not a member yet? Register   Sign In
Call to undefined function anchor( ) when stepping through the tutorial.
#1

[eluser]Chris (from L.C.)[/eluser]
I'm steeping through the video tutorial, and I'm stuck on the adding the comment form helper. I've correctly added the helpers in blog.php, and the anchor call, but I'm getting this error:

Call to undefined function anchor() in /home/quickgig/public_html/system/application/views/blog_view.php on line 17

I've left it up at http://www.quickgig.com/blog, along with the
Code:
<?php phpinfo(); ?>
tag incase there is something there helpful.

Here's the blog.php code:

Code:
<?php
class Blog extends Controller {

function blog()
{
  parent::Controller();
  
  $this->load->helper('url');
  $this->load->helper('form');
}

function index()
{
  $data['title'] = "Blog Title";
  $data['heading'] = "Blog Heading";
  $data['query'] = $this->db->get('entries');
  
  $this->load->view('blog_view', $data);
}
}
?>

and the blog_view.php code:

Code:
<html>
<head>
<title><?=$title; ?></title>
</head>

<body>
<h1>&lt;?=$heading; ?&gt;</h1>

&lt;?php phpinfo(); ?&gt;

&lt;?php foreach($query->result() as $row): ?&gt;



<h3>&lt;?=$row->title?&gt;</h3>
<br>
<p>&lt;?=$row->body?&gt;</p>

<p>&lt;?=anchor('blog/comments', 'Comments');?&gt;</p>

<hr>
&lt;?php endforeach; ?&gt;



&lt;/body&gt;
&lt;/html&gt;


Ideas?


Messages In This Thread
Call to undefined function anchor( ) when stepping through the tutorial. - by El Forum - 07-23-2007, 02:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB