guestbook

Extends: [None]

This class allows for a guestbook to be created on a website

demonstrates how to implement user interactivity through the use of a feedback/guestbook form.

Constructor Summary
guestbook ( string $username, string $password [, string $url ] [, string $database ] )

Class constructor.


Method Summary

string

display_form ()

Displays the feedback submission form to the user.

boolean

authorise ( string $passcode )

Authorises any given submission.

string

post_comment ( string $name, string $email, string $website, string $comment, string $admin )

Saves the submission on the database.

string

view_comments ()

View all authorised comments.


Constructor Detail

public void guestbook ( string $username, string $password [, string $url ] [, string $database ] )

Connect to the database.

Parameters:

  • string $username
    The username of the MySQL database.
  • string $password
    The password of the MySQL database.
  • string $url
    The location of the MySQL database.
  • string $database
    The name of the MySQL database.
  • Method Detail

    public string display_form ()

    Displays the feedback submission form to the user.

    Returns:

    The HTML formatted form.


    public boolean authorise ( string $passcode )

    Authorises any given submission.

    Parameters:

  • string $passcode
    The unique reference code for the submission.
  • Returns:

    TRUE on success, FALSE if there is a problem finding the submission.


    public string post_comment ( string $name, string $email, string $website, string $comment, string $admin )

    Saves the submission on the database.

    Parameters:

  • string $name
    Who made the submssion.
  • string $email
    Contact address of the person that made the submssion.
  • string $website
    Their website.
  • string $comment
    Their submission content.
  • string $admin
    Admin email address, to send the authorisation code.
  • Returns:

    The confirmation message in HTML.


    public string view_comments ()

    View all authorised comments.

    Returns:

    The HTML formatted comments as a LIST.


      [ Generated in: 0.138s on: Mon, 06 Aug 2007 15:01:44 +0100, version: 1.1 ]

    OmegaSoft ClassDoc API Documentation Tool 2007