[eluser]ConnorD[/eluser]
Hi,
I am fairly experienced in PHP, but brand new to CI, so please bare with me. I have been having no trouble until I tried to load a view from my controller:
Code:
<?php
class Home extends Controller{
function index(){
parent::Controller();
}
function Home(){
$data['title'] = "Livefootballtalk - Home";
$data['intro'] = "Livefootballtalk is a soccer/football fan community where fans from all different countries and clubs can meet and discuss about world football competitions and players. Also, the fans may interact through their profile pages and messager. We invite you to be a real fan and <a href='register.php?step=1'>join</a> the community!";
$this->load->view('home', $data);
}
}
?>
I am getting an error message on my codeigniter page from my browser saying: "A PHP Error was encountered
Severity: Notice
Message: Undefined property: Home::$load
Filename: controllers/home.php
Line Number: 11".
I don't understand it, because I have done everything with the tutorials. Any help would be appreciated, thank you.
BTW, here is my view if it is of interest:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html >
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/1.css" type="text/css" media="screen,projection" />
</head>
<body>
<div id="top">
</div>
<div id="container">
<div id="menu">
<ul id="nav">
<?php
?>
</ul>
<br class="clear" />
</div>
<div id="sidebar">
<h1 class="first">
Home
</h1>
<p>
</p>
<h1>My Account</h1>
<ul class="linkroll">
<?php
?>
</ul>
</div>
<div id="content">
<?php
?>
<br />
<h1>Welcome to Livefootballtalk!</h1>
<br />
<img src="../images/soccer_fans.jpg" width="380" height="280" /><br />
<p>
<?php
echo $intro;
?>
</p>
<br /><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/dIlcc7Vks-8&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/dIlcc7Vks-8&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>
</p>
<br />
<?php
echo "<br><font color='black'>Latest Discussions:</font><br>";
foreach($threads_query->result() as $row){
echo "<table border='0'><tr><td>Subject: <br><br><a >subject'>$row->subject</a></td></tr><td><td>By: <a >username'>$row->username</a></td></tr></table></table><hr>";
}
?>
</div>
<div id="footer">
<p>Copyright 2008 Livefootballtalk.com | <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</div>
</body>
</html>