FurryGorilla
Technical User
Hi
I've only just started getting to grips with Perl and am having a small problem. I have a simple feedback form which passes the name, e-mail address, date, department and questions of the user who submits the form.
However, I currently have it writing a simple HTML page when the user submits but I would prefer it to go directly to a web page.
The code I currently have to write the web page is as follows but is there a simple way to change this to redirect the browser:
............
print MESSAGE "$FORM{department}\n\n";
print MESSAGE "$FORM{feedback}\n";
close (MESSAGE);
# Thank the user and acknowledge
# the feedback
&thank_you;
}
.....
sub thank_you {
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Thank You!</TITLE>\n";
print "</HEAD>\n";
print "<BODY BGCOLOR=#FFFFFF TEXT=#000000>\n";
print "<H1>Thank You!</H1>\n";
print "\n";
print "<P>\n";
print "<H3>Your feedback is greatly appreciated.<BR>\n";
print "Click here to <A HREF=link.htm>Back</A>.\n";
print "<P>\n";
print "</BODY>\n";
print "</HTML>\n";
exit(0);
}
Thanks in advance
Chris
I've only just started getting to grips with Perl and am having a small problem. I have a simple feedback form which passes the name, e-mail address, date, department and questions of the user who submits the form.
However, I currently have it writing a simple HTML page when the user submits but I would prefer it to go directly to a web page.
The code I currently have to write the web page is as follows but is there a simple way to change this to redirect the browser:
............
print MESSAGE "$FORM{department}\n\n";
print MESSAGE "$FORM{feedback}\n";
close (MESSAGE);
# Thank the user and acknowledge
# the feedback
&thank_you;
}
.....
sub thank_you {
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Thank You!</TITLE>\n";
print "</HEAD>\n";
print "<BODY BGCOLOR=#FFFFFF TEXT=#000000>\n";
print "<H1>Thank You!</H1>\n";
print "\n";
print "<P>\n";
print "<H3>Your feedback is greatly appreciated.<BR>\n";
print "Click here to <A HREF=link.htm>Back</A>.\n";
print "<P>\n";
print "</BODY>\n";
print "</HTML>\n";
exit(0);
}
Thanks in advance
Chris