FleshCoat
09-11-2011, 07:51 PM
if(!$_POST['page']) die("0");
$page = (int)$_POST['page'];
if(file_exists('pages/page_'.$page.'.php'))
echo file_get_contents('pages/page_'.$page.'.php');
else echo 'Page does not exist! Go back!';
Ok, so the code i displayed will fetch the file "page_1,2,3,4" from the folder. When i go to use "#pagefaq" it will not fetch it. I have to use a number for it to fetch the page. ex: "#page1". I want/and am trying to code another type of php line like the one for "page" but instead i want it to use "faq" so i can have a seperate linking system to keep the pages in order. I am still working on the problem right now, but i am not sure how to go about it correctly, so im kind of trial and erroring as i go along, seeing if random things i think of work. So far, no luck. Can anyone help me?
$page = (int)$_POST['page'];
if(file_exists('pages/page_'.$page.'.php'))
echo file_get_contents('pages/page_'.$page.'.php');
else echo 'Page does not exist! Go back!';
Ok, so the code i displayed will fetch the file "page_1,2,3,4" from the folder. When i go to use "#pagefaq" it will not fetch it. I have to use a number for it to fetch the page. ex: "#page1". I want/and am trying to code another type of php line like the one for "page" but instead i want it to use "faq" so i can have a seperate linking system to keep the pages in order. I am still working on the problem right now, but i am not sure how to go about it correctly, so im kind of trial and erroring as i go along, seeing if random things i think of work. So far, no luck. Can anyone help me?