#html file
<html.............>
<form action=somecgifile.cgi method=post>
<input type=text name=teststring><br>
<input type=submit value=submit>
<input type=reset value=clear>
</form>
<............/html>
Code:
#the cgi file
#!perls home (loctation on server Hard drive)
use CGI qw(:standard);
#
my ($teststring,$buffer,$name,$value,$pathone,$pathtwo);
#
$pathone="htpp:somesite.com";
$pathtwo="http:anothersite.com";
#
read(STDIN,$buffer,$ENV{CONTENT_LENGTH});
chomp $buffer; # i think will take away the ending '&'
($name,$value)=split(/=/,$buffer);
$teststring=$value;
#
if($teststring eq ('http:ihopethiscodeworks.com') || ('http:www.ihopethiscodeworks.com')){
print "Location: $pathone";}
#
else {print "Location: $pathtwo";}