![]() |
GuestBook
|
|||||||
| (c)
|
||||||||
OverviewThis extension installs a new object It provides consistency checks, HTML formatting, time stamping and entry alignment. StatusStarting with V2, GuestBook can be ordered for 12 Euro online. HistoryV3.0:
V2.0:
V1.0:
|
Detail
In 'passive' mode the object simply outputs the content of the guestbook file. When a form calls this object, it runs in 'active' mode and checks the integrity of the values submitted by the form. You can specify fixed values for some fields or give a symbolic placeholder which is replaced by the value of the field. 'Filename' specifies the filename under which the guestbook entries are saved into and loaded from. Although this is a html file there must be no html or body tags in this file! 'Submitbutton' is the name of the submit of the originating page. For consistency checks, you can enter a comma-separated list of field names to check. If any field is left blank, only the 'Error Message' is displayed. If you have a special email form field you can name it. For further processing you can setup a timestamp value, where the given format string must contain variables for the current values:
(There are several other characters, look at the PHP 'date' function) The format fields accept html strings only. They are used to format the entry saved into the guestbook and are filled with the form content on the fly: enter your html code and enclose the form field names in curly brackets (for the form field 'street' add {street} into your format string). There are two special fields: {timestamp} is the current timestamp you have set up previously. If the form contains a valid email address the 'eMail Format' string is used - - otherwise the simple 'Format' string is used. In case the check of the provided fields fails the html formatted error string will be shown and no processing is performed. RequirementsThe form must send its data with the POST method, multipart/form-data is recommended as the transfer type. Take care that the object performs on pages of type PHP only! Create an totally empty guestbook file first- with no html or body tag at all! The guestbook file must be writeable by PHP (look at the file permissions). |