Script working for content management systemPosting of content to the table We already have discussed the basic table structure and purpose of this content management script. Now we will learn how the script works. Site admin will login and enter into admin area. You can read the login script and learn how the pages are managed inside logged in area. There is a file check.php which checks the status of site-admin and allows the page execution. Admin can manage category by adding, deleting or editing name of any category. The page category.php takes care of this and while editing and category name it opens a child window and allows the admin to update the category name. We have used JavaScript refreshing parent window from child window technique to update the main page ( category.php ) with new category name.Admin can post the content ( read post.php file ) by entering title, short description, date and full description of the news or event. He can assign the content to a particular category. There is a server side validation to take care of wrong dates, short or long length of posting. It will generate error message saying what is wrong in posting. We have used post back technique to keep the entered content within the form in case of any error message. This will enforce some restrictions like, title must be of some length, short description is to be entered etc. After posting the content will be available in public area. Admin can view the same details inside admin area and delete them also. In the main public area the recent top 10 contents ( or news or events ) will be displayed. Please read index.php page. This is done by applying the order by clause in date of post field. Above this all the category names are displayed with the number of content present in that category. Users can click the category name and view that content of that category only. Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
![]() | ||||
▼ More on Managing Content from Admin area using PHP MySQL
| ||||