Jump to content

Recommended Posts

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.

 

Link to comment
https://forums.phpfreaks.com/topic/193277-cms-adding-pages-with-links/
Share on other sites

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

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.