UBC Home Page -
UBC Home Page -
UBC Home Page UBC Home Page -
-
-

-
  Faculty of Education  
- -
Services
Facilities
Instructional Support
Administrative Support
Network & Email
Web Hosting
Hours
Staff
Search

-

Computing & Media Services

Survey Script

A script is available for surveys.

The current script takes the output from a form and outputs it to a comma/quote delimited file.

To use this script you need the following:

  1. a page with a form. The form action should be /cgi-bin/survey.pl/path using the POST method, where
    • path is the relative path to the location where you want the result file to be (relative to the root of the URL you have)
    • a field named file, with the value set to the name of the results file (located in path) - normally this field would be hidden
    • you may have a field named display. The value of this field is a page that will be displayed after the form is submitted. It must also be in the path location - normally this field would be hidden
  2. to have the webmaster create the results file and set properties appropriately (read/write for you and writable by others). You can then download the file (with the entered data) directly from your web site.

An example form could look like:

<form name="form1" method="post" action="/cgi-bin/survey.pl/webinfo/">

<input type="hidden" name="file" value="survey.results">
<input type="hidden" name="display" value="nice_message.html">

<p> Name <input type="text" name="name" maxlength="25">

<p><input type="submit" name="Submit" value="Submit">

</form>

Name

This would then produce a line in the file /webinfo/survey.results something like

"your.dns.ubc.ca","10.0.114.5","Wed Jun 6 08:32:18 PDT 2001","Your Name"

 






Quick Search




Refine your Search



Last updated March 14, 2008

Faculty of Education
2125 Main Mall, Vancouver, BC V6T 1Z4

© Copyright The University of British Columbia, all rights reserved.