Damn perl

Aug. 17th, 2000 02:19 pm
[personal profile] batskeets
I'm STILL getting internal server errors. Anybody wanna tackle this one?

#!/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;   
  }

March 2017

S M T W T F S
   1234
567891011
1213 1415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 24th, 2026 12:59 pm
Powered by Dreamwidth Studios