Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 1998 10:50:40 +0000 (GMT)
From:      "Jeremy D. Hartley" <ringlord@www.dcoisp.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   CGI and HTML files continued.
Message-ID:  <Pine.BSF.3.96.980330104758.12459B-300000@www.dcoisp.net>

index | next in thread | raw e-mail

[-- Attachment #1 --]
I have decided to also send out the files attached, in case something goes
messy in the email message.
Once again, I realize that this is probably off topic, but I am in a spot
with not many people to turn.
Thanks for putting up with me.
Jeremy D. Hartley


[-- Attachment #2 --]
#!/usr/bin/perl
&readparse;
print "Content-type:text/html\n\n";
print "<html><head><title>Form results</title></head><br>";
print "The information you submitted is included below.<br>";
print "In order to complete your order, please print and send this form and
send it to us.";
$firstname = $value[0];
$lastname = $value[1];
$address1 = $value[2];
$address2 = $value[3];
$city = $value[4];
$state = $value[5];
$zip = $value[6];
$phone = $value[7];
$fax = $value[8];
$email = $value[9];
$comments = $value[10];
$single = $value[11];
$double = $value[12];
$tripple = $value[13];
$grand = $value[14];
$sports = $value[15];

print "First name: $firstname<br>";
print "Last name: $lastname<br>";
print "Address: $address1<br>";
print "$address2<br>";
print "City: $city<br>";
print "State: $state<br>";
print "zip is: $zip<br>";
print "Phone: $phone<br>";
print "fax: $fax<br>";
print "e-mail: $email<br>";
print "comments: $comments<br>";
print "plan: $single $double $tripple $grand<br>";
print "sports: $sports<br>";












#******** END BODY************************
#
# EACH VALUE IN THE HTML FORM WILL BE CONTAINED IN
# THE THE @VALUE ARRAY.
sub readparse {
read(STDIN,$user_string,$ENV{'CONTENT_LENGTH'});
if (length($ENV{'QUERY_STRING'})>0) {$user_string=$ENV{'QUERY_STRING'}};
$user_string =~ s/\+/ /g;
@name_value_pairs = split(/&/,$user_string);
foreach $name_value_pair (@name_value_pairs) {
        ($keyword,$value) = split(/=/,$name_value_pair);
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/ge;
        push(@value, "$value");
          $user_data{$keyword} = $value;
}
}
[-- Attachment #3 --]
<html><head><title>Join the Informer Today!</title></head>
<h2>Join the Fantasy Sports Informer Today!</h2>

<body>
<p>
Here at FSI, we give you many ways to participate in the sports you
love.<br>

If you wish to pay with your Visa or Mastercard, more information is
availible by clicking <a href="http://www.fantasysportsinformer.com/credit.html">here.</a>;

<p>
Folks wishing to pay by check or money order may do so by completely filling
out the form below.<br>
After you complete the form, a copy will be e-mailed to the address you
specified on the form.  Simpley print out the completed form and send it to
the address provided when you submit the form to us.<br>

<br>
<h3>ORDER FORM</h3>
<br>

<form action="cgi-bin/order.cgi" " method=post>
<br>
<p>
First name: <input type=text size=25 name="first"><br>
Last name: <input type="text" size=25 name="last"><br>
Street address, line 1: <input type=text size=40 name="address_1"><br>
Street address, line 2: <input type=text size=40 name="address_2"><br>
City: <input type=text size=45 name="city"><br>
Enter your 2 letter state code (CA California) <input maxlength=2 name="state"><br>

Enter your Zip or postal code: <input type=text maxlength=9 name="zip"><br>
Phone number (777-555-1212) <input maxlength=16 name="phone"><br>
Fax number: (777-555-1212) <input maxlength=17 name="fax"><br>
E-mail address: <input type=text size=25 name="email"><br>

Where did you hear about us? <input type=text name="comments"><br>
<p>
<h2>CHOOSE YOUR PLAN</h2>
Which of the four plans do you wish to signup for?

<input type=radio name="plan" value="single">Single Sport

<input type=radio name="plan" value="doubleplay">Doubleplay two sport plan<br>
<br>
<br><input type=radio name="plan" value=tripleplay">Trippleplay 3 sport plan<br>
<input type=radio name="plan" value="grandslam">Grandslam 4 sport plan<br>
What other sports do you like? <input type=text name="sports"><br>
<p>
<input type=submit value="submit this form."><br>
<input type=reset value="reset and start over."><br>
</form>
</body</html>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980330104758.12459B-300000>