|
Hi there,
Im new to perl/cgi and I am having a few problems trying to get my data to write to my text file. I think that I have done everything right but obviously I'm here so I havent. I can get my data to write straight in html form, or send to an email. But whenever I seem to execute the cgi file it doesnt write to the text file. Here is the code listed below that I am using.
#############################
## DATA WRITTEN TO OUTFILE ##
#############################
open(OUTFILE, "/forum/gtgtoutput.txt"); #open outfile with name "/forum/output.txt"
print OUTFILE "Comments Data:\n\n";
print OUTFILE "Name: $name\n";
print OUTFILE "Surname: $surname\n";
print OUTFILE "Address: $address\n";
print OUTFILE "Phone: $phone\n";
print OUTFILE "Email: $email\n";
print OUTFILE "Comments: $comments\n\n";
close(OUTFILE);
The data is read in from a form and should write to the output.txt file! Whenever I execute the file from the command line I get:
Comments Data:
Name:
Surname:
Address:
Phone:
Email:
Comments:
Obviously that is right because there is nothing passed in. But when I do it from the form it doesnt work at all.
Can someone please give me some insight to this issue. That would be great!!
Cheers
|
|
|
|
|
|
|
// |