[eluser]dadamssg87[/eluser]
Hi,
I'm trying to go through the tutorial and i can not pass the $data variables to views. I have no idea whats going on. I am using MAMP.
here is my controller
Code:
<?php
class Register extends Controller {
function Register()
{
parent::Controller();
$this->load->helper('form');
$this->load->library('session');
}
function index()
{
$data['title'] = "Register!";
$this->load->view('header_view', $data);
$this->load->view('register_form');
$this->load->view('footer_view');
}
}
?>
and here is my view
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?=$title?></title>
</head>
<body>
and i'm getting this error
Quote:<h4>A PHP Error was encountered</h4>
<p>Severity: Notice</p>
<p>Message: Undefined variable: title</p>
<p>Filename: views/header_view.php</p>
<p>Line Number: 8</p>
any help would be MUCH appreciated! Thanks in advance!