I am coding my own Blog cms. In which i wants to code the following features.
Public Area:
1.Navigation Bar.
2.Posts on the index page which includes. Small post image then post title and post content of about 200 characters. Then a Read more button that will take the user to full post page.
Admin Area:
1.Posts CRUD (Create Read Update Delete).
2.General Information CRUD like Title Meta Keyowords and some other stuff.
What i can do from the above is:
1.I can grab the post content etc from the database .
- I can create the post CRUD.
The things i need help about are:
How i can create the full post page means when user clicks on Read More button or post title it will take the user to full post page. I don’t know how this whole things works.
Can you please explain how i can create this , how i will manage the database for this. It seems simple but i dont have any idea how i can do it.
If possible any example simple cms that has this feature (Not wordpress and others). Any tutorials on how to do this ?
Any help will be appreciated.
Thanks a lot
Jasminder
I believe you are looking for the term “CRUD” = Create, Read, Update, Delete. http://en.wikipedia.org/wiki/Create,_read,_update_and_delete
It is actually quite simple. You would need to use $_GET to get some value that would associate to a certain post, for example if you have a table like:
It would make sense to associate the post with id. Then you would have a file, let’s call it “read.php”
In that file you need to get the $_GET value and then query for the post the id is associated with:
Pseudo:
Remember to protect against with XSS. http://shiflett.org/articles/cross-site-scripting