(no subject)
Aug. 17th, 2000 11:56 amI'm going to work soon. I really hope they find some more stuff for me to do.
#!/usr/bin/perl
use CGI qw(:standard);
#Include lib file containing Parse_Form subroutine & call subroutine
require "parse.lib";
&Parse_Form;
#opens
output file for writing information
open (OUT, ">>./lsdtreg.txt") || &ErrorMessage;
$complete = $formdata{'complete'};
if ($complete eq "YES") {
#prints info to lsdtreg.txt
print OUT "$formdata{'first'},$formdata{'last'},$formdata{'email'},$formdata{'id_num'}";
#closes file
close (OUT);
#redirect to successful registration page
print redirect ("http://jcomm.uoregon.edu/departments/undergrad/lsdtreg/submit.html");
}
else {
#redirect to error page
print redirect ("http://jcomm.uoregon.edu/departments/undergrad/lsdtreg/error.html");
}
sub ErrorMessage {
print "Content-type: text/html\n\n";
print "The server can't open the file. It either doesn't exist, or the permissions are wrong. \n";
exit;
}