Welcome Guest, Not a member yet? Register   Sign In
Error
#1

[eluser]Ben[/eluser]
Am new in code ignitor and the tutorial am doing shows this error although everything seems in order

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: records
Filename: views/welcome_message.php
Line Number: 50


My welcome_message.php is

<?php foreach($records as $row) : ?>
<h1>&lt;?php echo $row->title; ?&gt;</h1>
&lt;?php endforeach; ?&gt;


Please help
#2

[eluser]osci[/eluser]
the message means you are not passing this variable: records.
#3

[eluser]Ben[/eluser]
And how do i solve that?
#4

[eluser]osci[/eluser]
post from controller how you are passing data and from your model how you are getting your data.
And please post in code tags your code to be copied easily, use [ code] [ /code]
without the pace after [




Theme © iAndrew 2016 - Forum software by © MyBB