This one is very simple, but I've gone in so many circles today I'm completely lost!
I'm trying to grab the correct page title and page content, based upon a variable I set at the top of the page. ie:
<?php
$pageIDn = 2;
include($_SERVER['DOCUMENT_ROOT'] .'/includes/functions.php');
content($pageIDn); // the function that queries the DB
include($_SERVER['DOCUMENT_ROOT'] .'/includes/header.php'); ?>
Within functions then I have this function/query:
function content($pageID){
$query = mysql_query("SELECT * FROM pages WHERE id = 1");
$title = $query['title'];
$content = $query['content'];
}
And then in the relevant locations in the file I'm trying to echo the variables ie:
<h2><?php echo $content; ?></h2>
I know I've made a very stupid mistake here somewhere... just not sure where.