SelectNet Internet Services

Internet Solutions for the Business Community

Domain Name Support

Web Hosting Support

Access/Connectivity Support

Billing Support

Service Change Request

Service Cancellation

Contact Us
>home/support/hosting/web hosting/uploading Monday, December 4, 2023    
Web Hosting Services Support

CGI-BIN (Unix Platform)

SelectNet provides a personal CGI-BIN area for your own custom scripts and programs, as well as some common scripts that are available for all of our Web hosting customers. For personal scripts, we do reserve the right to review the code and remove the script (or disable it) from our system if it is causing "problems" with our services.

We currently provide two scripts:

Mail Web Form
Hit Counter

MailWebForm - This script will e-mail Web form data to a designated recipient and display a response Web page.

The MailWebForm script requires the following form action and hidden variables:

<form method="POST" action="/cgi-bin/MailWebForm">
<input type="hidden" name="mailto" value="[YOUR EMAIL ADDRESS]">
<input type="hidden" name="subject" value="[SUBJECT OF EMAIL]">
<input type="hidden" name="outputurl" value="[VIRTUAL PATH TO THANKYOU PAGE]">

The rest of the form fields are the data your are collecting. Each field should be assigned a "name" in order for the information to be e-mailed correctly.

The e-mail generated and sent to your e-mail address will be sent from our web server's gerneric e-mail address. In order to correctly reply to the user of the form using your e-mail software's reply feature, you must name the e-mail field that the user fills out either "MailFrom" or "email". As long as you collect the user's e-mail address using one of theses input field names, the Mail Web Form script will correctly setup the reply-to address in the e-mail it generates to your address. Here is an example:

Email: <input type="text" name="MailFrom"><br>

Optionally, you may specify required fields. The value of this field should be a comma (,) seperated list of fields that cannot be blank, or else the user gets and error message and is prompted to return to the form and correct the error.

For example:

<form method="POST" action="/cgi-bin/MailWebForm">
<input type="hidden" name="mailto" value="">
<input type="hidden" name="subject" value="Web Survey">
<input type="hidden" name="outputurl" value="/thankyou.html">
<input type="hidden" name="required" value="name,age,hobby">
Name: <input type="text" name="name"><br>
Age: <input type="text" name="age"><br>
E-mail: <input type="text" name="email"><br>
Hobby: <input type="text" name="hobby"><br>
Phone: <input type="text" name="phone"><br>

In this case, if the Name, E-mail, or Hobby fields are left blank, the form results will not be emailed until the user fixes the errors.

When the the "mailto" recipient receives the email, it is very generic. We have added a feature that allows you to control the format of the email, based on a text file "template". This template must be an ASCII file placed in your "scripts" directory, and you must create a hidden variable telling the MailWebForm what template file to use. For example, if we have a file called "survey.txt" in the "scripts" folder, and want to use it as a template, we must include it as a hidden variable like so:

<input type="hidden" name="template" value="survey.txt">

The format of the template is simple, just type out how you want the body of the email to look in plain text, and wherever you want a variable subsituted, enclose the variable name in square brackets [ ]. For example, using the survey form HTML above, my template could work like this:

[name] has filled out the survey!

He/she is [age] years old, and likes [hobby]. You can call them at [phone], and email them at [email].

These bracketed words will now be substituted with the data filled out on the form.

Hit Counter - This script will allow you to add a hit counter to any page within your web site. Please visit our hit counters page for examples and the sample code to insert into your page where you want the counter to appear.

Legal | Privacy | Contact Us

Copyright© 1995-2022 SelectNet Internet Services. All rights reserved.
Services, prices, and terms subject to change without notice.