I was working on this tutorial http://fuelphp.com/forums/topics/view/3228
but at the end of where you code the part that takes in comments for messages posted, I get this error
ErrorException [ Notice ]: Undefined variable: message
APPPATH/views/comments/create.php @ line 3:
2: <?php echo render('comments/_form'); ?>
3: <p><?php echo Html::anchor('messages/view/'.$message, 'Back'); ?></p>
what went wrong?
i simply copy/pasted it all
Hi,
The tutorial Im referring to is
http://ucf.github.com/fuelphp-crash-course/
Looks like the error is in the syntax. Can anyone spot it?
Thanks for your reply, I really want to get into fuel.
PS: btw, do you (or anyone else) know of any tutorial that uses the current version?
Although i really like the above tutorial. Very complete.
Look for the code that loads the 'comments/create' view.
This errors means there is no variable called 'message' passed to the view. Go through the code to see where 'message' is set (or not) and how it's used.
From what i can see on that the tutorial page is that it does a set_global() of the 'message' variable in case nothing is posted, but I don't see it being set after a post.
I wasn't referring to the view, but to the controller (or controllers) that load the view.
One of the controller methods isn't passing a $message variable to the view, which causes the notice.
This by the way looks like the _form.php file, containing the generated form.