Jump to content

Page not calling correctly


FleshCoat

Recommended Posts

So i am useing PHP & Jquery to call unpon pages in a subfolder to present it'self into my main content space. It works correctly when i just have it calling "#Page1,2,3,4" #Page with numbers after it, but that would get very confuseing if i had many pages. I want to make it so that i can use "#faq1,2,3,4" also with the "#page1,2,3,4" to call seperate pages, to give them a specific catagory so i wont get confused by my own websites page contents.

 

Here is the code i am useing.

 

<?php

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!';

?>

 

So, my question is. How do i tweek this php coding to allow me to also use "#faq" or any other word i wish in its place to be used.. but also open up in my main area!? Thank you in advance for the replys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.