#!/usr/local/bin/perl -w #SubmitForm.pl print "content-type: text/html\n\n"; use CGI qw(:standard); #use DateTime; #prevent perl from creating undeclared variables use strict; #declare variables my ($FirstName,$LastName,$Hphone,$Wphone,$Cphone,$Reason,$AppDate1,$AppTime1,$AppDate2,$AppTime2,$AppDate3,$AppTime3,$Note); #$MyDateTime= DateTime->now(); #$MyDate= $MyDateTime->date(); #$MyTime= $MyDateTime->time(); #my $dt3 = DateTime->now(); # With date and time #my $dt4 = DateTime->today(); # Truncated to date # Some standard ones # my $s1 = $dt->date(); # 1998-04-07 # my $s2 = $dt->mdy('|'); # 04|07|1998 # my $s3 = $dt->datetime(); # 1998-04-07T13:55:00 # my $s4 = $dt->time(); # 13:55:00 # my $s5 = $dt->hms('x'); # 13x55x00 $FirstName=param('T1'); $LastName=param('T2'); $Hphone=param('T3'); $Wphone=param('T4'); $Cphone=param('T5'); $Reason=param('T6'); $AppDate1=param('T7'); $AppTime1=param('T8'); $AppDate2=param('T9'); $AppTime2=param('T10'); $AppDate3=param('T11'); $AppTime3=param('T12'); $Note=param('T13'); #create web page print "\n"; print "feedback\n"; print "\n"; open(OUTFILE,">>","ApptFile.txt") or die "Error opening survey.txt. $!, stopped"; #open(OUTFILE,">>","/cgi-bin/survey.txt") or die "Error opening survey.txt. $!, stopped"; #open(OUTFILE,"<","C:\Inetpub\wwwroot\cgi-bin\survey.txt") or die "Error opening survey.txt. $!, stopped"; print OUTFILE "$FirstName,$LastName,$Hphone,$Wphone,$Cphone,$Reason,$AppDate1,$AppTime1,$AppDate2,$AppTime2,$AppDate3,$AppTime3,$Note\n"; close(OUTFILE); print "Thank you ",$FirstName," ", ", Your Appointment is submitted.
\n"; print "
\n"; print "We will call you to setup your appointment.
\n"; print "
\n"; print " Please Click on Back Bottun on the top menu
\n"; print "
\n"; print "\n"; print "\n";