Specifications

All this information is shown on the stories screen, first with
echo date(“M d, H:i”, $qry[created]);
and then
echo date(“M d, H:i”, $qry[modified]);
and finally
if ($qry[published])
echo “[Published “.date(“M d, H:i”, $qry[published]).”]”;
else {
echo “[<A HREF=\”story.php?story=”.$qry[id].”\”>edit</A>] “;
echo “[<A HREF=\”delete_story.php?story=”.$qry[id].”\”>delete</A>] “;
echo “[<A HREF=\”keywords.php?story=”.$qry[id].”\”>keywords</A>]”;
}
This will show the published date if appropriate; otherwise, it will show links to edit or delete
that story and to set search keywords.
The script for entering a new story or editing an existing one is story.php, and is shown in
Figure 26.6 editing one of the stories in the sample application database.
Building Practical PHP and MySQL Projects
P
ART V
606
FIGURE 26.6
Editing a story.
32 7842 ch26 3/6/01 3:36 PM Page 606