Help for this page

Select Code to Download


  1. or download this
    # Read in all the variables set by the form
    CGI::ReadParse(*input);
    ...
    $month = $input{'month'};
    $date  =  $input{'date'};
    $year  =  $input{'year'};
    
  2. or download this
            my $month = $q->param('month');
            my $date  = $q->param('date');
            my $year  = $q->param('year');
            my $title = $q->param('title');
            my $message = $q->param('message');
    
  3. or download this
    #!/usr/local/bin/perl
    use CGI qw/:all/;
    
    my $q = new CGI;
    
  4. or download this
    #!/usr/local/bin/perl -w
    use strict;
    use CGI;
    
    my $q      = new CGI;
    
  5. or download this
    CGI::ReadParse(*input);
    
  6. or download this
    print "Content-type: text/html\n\n";
    
  7. or download this
    print $q->header();
    
  8. or download this
    if($action eq "add_data"){
            print "Your post was sucessful<br>";
    ...
    }
    else{
    }
    
  9. or download this
    if($action eq "add_data") {
            print "Your post was sucessful<br>";
    ...
    } else {
            print STDERR "Unrecognised action: [$action]\n";
    }
    
  10. or download this
    # in CountCurrentRecords
    open(DATABASE, "$database");
    
  11. or download this
    # in CountCurrentRecords
    $number = 1;
    # ...
    $number = 0 if $number < 0;
    
  12. or download this
    # in preview
    print "<html>
    <HR>
      <table border='0' width='100%'>
    ...
    
  13. or download this
    # in add_data
    $addfile = "events.txt";
    
  14. or download this
    sub add_data {
            my ($q, $numberoflines, $addfile) = @_;
    ...
            print OUT "$line\n";
            close OUT;
    }
    
  15. or download this
    if ($action eq "add_data") {
            print "Your post was sucessful<br>";
            add_data($q, $numberoflines, $database);
    }