Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Printing to a Text File With CGI.PM
Hello,

I hope someone will be able to help me resolve this. I have the following
CGI script set up to write a file. The script runs fine (no errors), but is
not writing to the file. I'd appreciate any tips you can offer to help
resolve this.

Thanks, Maureen

#!/usr/local/bin/perl -wT
use CGI ':standard';
my $comments, $FirstName, $LastName, $FullName, $gift, $email, $Address,
$Address2, $City, $State, $zip_code, $phone, $ext, $gift, $type, $num1,
$num2, $num3, $num4, $nameoc, $expires;
$comments = param('comments');
$FirstName = param('FirstName');
$LastName = param('LastName');
$FullName = $FirstName . ' ' . $LastName;
$Address = param('Address');
$Address2 = param('Address2');
$City = param('City');
$State = param('State');
$zip_code = param('zip_code');
$phone = param('phone');
$ext = param('ext');
$email = param('email');
$gift = param('gift');
$type = param('type');
$num1 = param('num1');
$num2 = param('num2');
$num3 = param('num3');
$num4 = param('num4');
$nameoc = param('nameoc');
$expires = param('expires');
open (LOG, ">>sail.txt") || Error('open', 'file');
print LOG "Donor's Name: $FullName\n";
print LOG "Street Address: $Address\n";
print LOG "Secondary Address Information: $Address2\n";
print LOG "City: $City\n";
print LOG "State: $State\n";
print LOG "Zip Code: $zip_code\n";
print LOG "Phone: $phone\n";
print LOG "Extension: $ext\n";
print LOG "Email Address: $email\n";
print LOG "Dollar Amount of Gift: $gift\n";
print LOG "Card Type: $type\n";
print LOG "First Num: $num1\n";
print LOG "Second Num: $num2\n";
print LOG "Third Num: $num3\n";
print LOG "Fourth Num: $num4\n";
print LOG "Card Name: $nameoc\n";
print LOG "Expires: $expires\n";
print LOG "Donor's Comments are: $comments\n\n\n";
close (LOG);




Report this thread to moderator Post Follow-up to this message
Old Post
Imogen
12-07-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:12 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.