10.2. Adding Posts
Figure 10-1 shows the form with a new post entry.
Figure 10-1. Figure 10-1
The admin page will be where the blog author will enter his posts. The 401.php file should be included at the start of it since the functionality of this page should only be allowed to the author after he's identified himself by logging in.
The page initially displays a list of available blog posts in a select control, although over time the number of posts will undoubtedly grow and presenting them this way may become cumbersome. You may want to consider listing them some other way — perhaps by first narrowing the list by month or year or as a data grid similar to the one I presented in the file manager project. Then the form through which the blogger will enter his post should offer fields to enter the post's date, title, and main content. Two third-party components are used in the form, a rich text edit box and a pop-up calendar component.