[eluser]aussie1855[/eluser]
In regards to your very last post Lab Tech I have now switched to that series of tutorials and thanks for the suggestion.
I have gotten further with them but still have a problem. if i use the file path /CI/index.php I can get the 'welcome page' and did so until i got to the part where we started adding the data array.
Now I get the following error:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /CI/application/controllers/site.php:1)
Filename: codeigniter/Common.php
Line Number: 356
An Error Was Encountered
Unable to load the requested file: home , $data.php
I was wondering if you could help me with this problem now. Below are the two php files.
site.php -->
<?php
class Site extends controller {
function index()
{
$data['myValue'] = "My Value";
$data['anotherValue'] = "Another Value";
$this->load->view('home , $data');
}
}
?>
home.php -->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="contianer">
<p> My view has been loaded </p>
<p> <?php echo $myValue; ?> </p>
<p> <?php echo $anotherVallue; ?> </p>
</div>
</body>
</html>
Thanks once again for all the help.
Michael
PS the common.php mention is the same as it came.