bullbreed Posted February 24, 2010 Share Posted February 24, 2010 Hi. I'm looking for a little direction in creating my CMS project. I'm trying to create a dynamically driven navigation where the admin can add and remove pages. I have a form that ask for the following information Page Name - This is the text that is shown for the link Page Parent - For parent and child hierarchy Meta Title Meta Description Meta Keywords Page Content How do I create the links for the pages? I don't want the admin to have to type "about-us.php" I would like it so when the user adds (About Us) as a page name that the url says pid=2 or something like that. Any push in the right direction would be great. Quote Link to comment https://forums.phpfreaks.com/topic/193277-cms-adding-pages-with-links/ Share on other sites More sharing options...
greatstar00 Posted February 24, 2010 Share Posted February 24, 2010 create a database like this pid, directory select * from pages where pid=$pid //your own code to do the mysql_query $rc=mysql_fetch_array($q) if(file_exists($rc['directory'])) include $rc['directory'] //to store stuff file_put_content($_POST['page_content'], $directory); NOTE: my directory means folder/filename.extension Quote Link to comment https://forums.phpfreaks.com/topic/193277-cms-adding-pages-with-links/#findComment-1017727 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.