Hello,
I got this code from one guy on this board some time ago and it worked perfectly fine, but today i must have edited something or whatever and it doesnt work anymore...
Can anyone please have a look at it, casue i've been reviewing my code from top to bottom and I CANT find anything wrong and its so frustrating :///
<?php
// if the page is set in q-string
if(isset($_GET['page'])){
$page = trim($_GET['page']);
}
// else page is not set
else {
$page = 'news';
}
// APPROVED of pages for inclusion
$pages = array('news', 'links', 'help', 'news_old', 'archive', 'videos', 'wallpapers', 'voting'); // etc...
// if acceptable request, page in array
if(in_array($page,$pages)) {
$file = $page . '.php';
include($file)
}
else {
echo 'Page not found. Return to <a href="index.php">index</a>';
}
?>
the error message is as follows:
[B]Parse error:[/B] parse error, unexpected '}' in [B]/home/mysite/public_html/www/index.php[/B] on line [B]253[/B]
The line 253 is the 5th one from the bottom in the above example (above "else" and contains only one character "}")
Please... please, help, im begging you... 🙁