CRMC File Database Project

Country Roads Motorcycle Club's Webmaster Dan Harvey was interested in
adding a classified ads database to his website, but was unsure how to
develop a system for his club members. He wanted the members to have
access to post ads containing name, contact information, and description
for their ad. Members and non-members would be able to query the ads
that members posted. The webmaster and other administrators would be
able to delete, add, and perform queries. Admin would also be able to
set expiration dates for ads; this feature would check classified ad dates
and remove old postings automatically.


Country Roads Website Homepage

Where the members post ads

Anyone can query the database


About the Project


The database was coded as a simple file oriented system because of the
simplicity of the member's needs. The majority of the project was coded
in server-side Perl/CGI scripting. Javascript was used to verify correct
information on the submission forms.

When a new record was to be entered into the database, Javascript functions
would verify input for valid email addresses, phone numbers, and filter out
vulgarity with regular expressions. When the record was verified as valid,
a CGI script would write the data to a data file.

Anyone could query the database. Queries could be ran by today's date, by
all listings in the database, or by search strings. Perl regular
expressions were used for queries. When a query is performed, a routine is
first run to check all record dates. The routine removes records that are
outdated leaving only new and valid records for user's to view.

The administration page was a static HTML page with links to remove selected
records, remove all records, and view database statistics. When deleting
all records, the database file would simply be deleted. Conversely, admin
could select one, or multiple, ads for deletion with the other deletion
option. The view stats link would show simple database statistics such as
total records in the database, number of searches since the database went
"on-line," and total posts by members since the database went live.