This is my first post here so apologies if the format is kind of messed up, I'm reading Build your own database driven website using PHP and MySQL. Until chapter 8, I managed to get all of the exercises to work with XAMPP on Win7 using the exact source code from the reference section.
When I put admin, includes and jokes folder into test folder located in c:/xampp/htdocs, and go to http://localhost/test/jokes, I get this where the list of jokes should be.
I also get the same error when searching at http://localhost/test/admin/jokes/Code:Fatal error: Call to undefined function bbcodeout() in C:\xampp\htdocs\test\jokes\jokes.html.php on line 18
Here is the code for jokes.html.php from chapter 8
I haven't a clue as to what I did wrong since every exercise has worked up to this point, obviously it has something to do with bbcodeout but I couldn't find any reference to this problem online.Code:<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/helpers.inc.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>List of Jokes</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> <body> <p><a href="?addjoke">Add your own joke</a></p> <p>Here are all the jokes in the database:</p> <?php foreach ($jokes as $joke): ?> <form action="?deletejoke" method="post"> <blockquote> <p> <?php bbcodeout($joke['text']); ?> <input type="hidden" name="id" value="<?php echo $joke['id']; ?>"/> <input type="submit" value="Delete"/> </p> </blockquote> </form> <?php endforeach; ?> </body> </html>
I'm running XAMPP 2.5