unify34 wrote:i guess the nav.php is the same.......although i did get an unexpecting "<" in the code so i fixed it into.....
Not sure what you mean here by ' unexpecting "<" in the code' ?
unify34 wrote:
<?php
// if the page is set in q-string
if(isset($_GET['page'])){
$page = trim($_GET['page']);
}
// else page is not set
else {
$page = 'main';
}
?>
<?php
// if the page is set in q-string
if(isset($_GET['page'])){
$page = trim($_GET['page']);
}
// else page is not set
else {
$page = 'main';
}
// *snip*
as you see there is now 2 seperate php codes...... think we can just connect it?
Heck yes! That is redundant code. You are doing the same thing twice. Remove the top one.
unify34 wrote:
um also it works but only for these pages
$pages = array('main', 'cdkeys', 'porn', 'bd'); // etc
Yes, I know that. The comment "// etc" means that YOU have to fill out the array with ALL of the pages that you have links to... Otherwise, the page request will be bad...
unify34 wrote:
i tried editing the names in the array but i had an invalid T string
Well, if you don't put the pages in the array, they won't be available to view. The "T-String" error probably means that you didn't enter an opening or closing quote, or there was a comma in the wrong place in your array definition. There cannot be a comma ',' after the LAST item in the array definition. OK? Make sure that each item is entered corectly in the array definiton:
// define an array:
$some_array = array('one', 'two', 'three', 'four', 'five', 'six');
Try again. You are close, but you have to finish this. You can do it.