Click here to Skip to main content
Click here to Skip to main content

EzFAQ 1.0

, 21 Jun 2001
Rate this:
Please Sign up or sign in to vote.
A complete app to add a FAQ list to a website.
<!-- Download Links --> <!-- Article image -->

Sample Image - ezfaq1.gif

<!-- Main HTML starts here -->

Introduction

I am not a web developer by trade but I have had dabbled with some web work (mostly as a hobby) from time-to-time.  I recently created a website for a project at work that would enhance collaboration between all team members.  Among other capabilities, I decided to create a Project FAQ List for the site.  The FAQ List app that I created, I call it EzFAQ, uses a Microsoft Access database and allows any member with access to the site to view, add, edit and delete entries in the FAQ List.  I had originally created a version of this app that would use a plain, tab-delimited text file in which to store the FAQs.  However, when I decided to allow all team members to have access to modifying the list, it was obvious that a database was needed.

The main page of the app, showfaqs.asp, is shown in the illustration above.  By default, the page displays only the titles of each FAQ in the EzFAQ List.  The FAQs are sorted by title.  The above illustration shows three dummy FAQs. 

You will notice that the FAQ titles are created as hyperlinks, if you click on a FAQ title, the text for that FAQ will be displayed.  The above illustration shows how the EzFAQ List appears when a FAQ is selected for viewing.

By selecting the "Printer Friendly" icon, the bodies of ALL FAQs are displayed to facilitate printing of the entire EzFAQ List.

By clicking on the icon, a user is presented with a form (enterfaq.asp) that is used to enter a new FAQ for addition to the EzFAQ List. 

The user enters the title to be displayed in the EzFAQ List in the "FAQ Title" text field of the form.  The body of the FAQ is entered in the "FAQ Text" field of the form.  If the user selects the "Cancel" button on the form, the user will be returned to the main page.  If the user selects the  "Submit" button, a confirmation page (submitfaq.asp) is displayed.

The confirmation page will display the contents of the FAQ as entered and will present the user with two buttons, a "Correct" button and a "No Way! It's Wrong!" button.  If the user clicks on the "No Way! It's Wrong!" button, the user will be taken back to the form to correct the FAQ entry.  If the user selects the "Correct" button, the processing page (processfaq.asp) is called to add the new FAQ to the EzFAQ List and the main page (showfaqs.asp) is automatically displayed again showing the newly added FAQ title.

By default, each FAQ has two icons after its title.  By clicking on the "Edit" icon the user may edit the FAQ.  By clicking on the "Delete" icon, the user may delete the FAQ from the EzFAQ List.  If the user selects the delete icon, a confirmation page (ConfirmDelete.asp) is displayed to make sure that the user really wants to delete the FAQ before proceeding.  For your project, you may want to restrict access to these capabilities.  I will discuss this more later.  

The delete confirmation page (ConfirmDelete.asp) provides two buttons, "Yes" and "Cancel".  By selecting the "Yes" button, the delete processing page (deletefaq.asp) is called to delete the FAQ from the EzFAQ List.  Once the FAQ is deleted, the main page (showfaqs.asp) is once again automatically displayed showing the list of FAQs with the deleted one now removed.

I have tried to make the app easy to modify.  The primary code is placed in include files so that you may easily modify the displayed pages to blend into your site.

Among the include files is the FAQCONFIG.inc.  This file contains numerous constants used by the app.  You can change settings in this file to easily set up the FAQ List to suit your site's configuration.

The FAQCONFIG.inc file provides a constant that points to the location of the database.  If you relocate the database, you should change this entry in the file.

Const FAQFile=".\FAQDB\FAQ.mdb" 	'MS Access database containing 
FAQ List.

I stated earlier that you could restrict access to the create, edit and delete capabilities.  One way to do this is to modify the EzFAQ app to add password access to the commands.  Alternately, you can change the settings of three constants in the FAQCONFIG.inc file shown below:

Const EnableCreate=true 	'Provide ability to create a FAQ
Const EnableEdit=true 	'Provide ability to edit a FAQ
Const EnableDelete=true 	'Provide ability to delete a FAQ

By setting these to false, the corresponding capability will not be provided.  You can then add, edit and delete FAQs yourself as webmaster.  This would be a good idea if you have a public site and want to provide extra security.  The project site for which I created this app already has restricted access and I can trust those who are using it to act intelligently and in a professional manner.

All other constants in the FAQCONFIG.inc file are to aid in customizing the look of the EzFAQ List.  For example, the color for the main app header and the color of the highlight for the selected FAQ may be changed in this file.

The include file, DBCONNECT.inc, provides the code to connect to and disconnect from the EzFAQ List database.

To use the app, just include the files/folders provided by the zip file into your website project and provide a link to the showfaqs.asp page.  Make sure that the database has the appropriate write access so your users can access it.

That's all there is to it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

George Chastain

United States United States
George Chastain is a Software Consultant in Huntsville, Alabama. Mr. Chastain is experienced in all phases of the software development life cycle including requirements analysis and definition, design, coding and test. This experience spans both interactive applications and embedded software. Mr. Chastain has extensive experience in C/C++ (including Visual C++), Ada 83, Ada 95 (including real-time, safety-critical), FORTRAN and other languages on Windows and Unix platforms. (Web development is JUST a hobby.)
 
Other articles authored by Mr. Chastain may be found at www.codeguru.com, a Windows development site, and at www.geocomm.com, a site supporting the GIS and GPS communities.
 

 

Comments and Discussions

 
GeneralMy vote of 4 Pinmemberiinicknguyenii27-Dec-10 2:17 
bad
QuestionNeed Something Like This For Links? PinmemberGeorge Chastain24-Aug-01 7:10 
GeneralGreat work PinmemberBrendan Tregear24-Jul-01 19:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 22 Jun 2001
Article Copyright 2001 by George Chastain
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid