ziffgone
02-13-2004, 05:35 PM
Hello, I have recently aquired a cgi script for form mailing. The form had almost everything I wanted, but I decided to add a couple of inputs to include as well. Then it came to the cgi script. I added two extra get form attributes to it and then added two extra print MAIL's to match, like so:
script_1:
&GetFormInput;
$email1 = $field{'email1'} ;
$email2 = $field{'email2'} ;
$subject = $field{'subject'} ;
$comments = $field{'comments'} ;
$thanks="Thank you for your order";
$spontext= $field{'spontext'} ;
$rush= $field{'rush'} ;
$message = "" ;
$found_err = "" ;
script_2: (Red color denotes addition.)
&GetFormInput;
$email1 = $field{'email1'} ;
$email2 = $field{'email2'} ;
$subject = $field{'subject'} ;
$comments = $field{'comments'} ;
$name = $field{'name'} ;
$address = $field{'address'} ;
$thanks="Thank you for your order";
$spontext= $field{'spontext'} ;
$rush= $field{'rush'} ;
$message = "" ;
$found_err = "" ;
I then simply added the following to the sendmail section:
print MAIL "".$name."\n" ;
print MAIL "".$address."\n" ;
Both scripts are identical with the exception of the above small change. "script_1" works just fine, but "script_2" comes up with the CGIWrap error of:
Error Message: No such file or directory
Error Number: 2
I would greatly appreciate it if someone could tell me why script_2 wouldn't work with this small change. The scripts are included below for comparison:
script_1:
&GetFormInput;
$email1 = $field{'email1'} ;
$email2 = $field{'email2'} ;
$subject = $field{'subject'} ;
$comments = $field{'comments'} ;
$thanks="Thank you for your order";
$spontext= $field{'spontext'} ;
$rush= $field{'rush'} ;
$message = "" ;
$found_err = "" ;
script_2: (Red color denotes addition.)
&GetFormInput;
$email1 = $field{'email1'} ;
$email2 = $field{'email2'} ;
$subject = $field{'subject'} ;
$comments = $field{'comments'} ;
$name = $field{'name'} ;
$address = $field{'address'} ;
$thanks="Thank you for your order";
$spontext= $field{'spontext'} ;
$rush= $field{'rush'} ;
$message = "" ;
$found_err = "" ;
I then simply added the following to the sendmail section:
print MAIL "".$name."\n" ;
print MAIL "".$address."\n" ;
Both scripts are identical with the exception of the above small change. "script_1" works just fine, but "script_2" comes up with the CGIWrap error of:
Error Message: No such file or directory
Error Number: 2
I would greatly appreciate it if someone could tell me why script_2 wouldn't work with this small change. The scripts are included below for comparison: