Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Nothing is being written into my opt-in.txt file

by poj (Priest)
on Jul 10, 2013 at 21:42 UTC ( #1043572=note: print w/ replies, xml ) Need Help??


in reply to Nothing is being written into my opt-in.txt file

Use this as your cgi, it will show you what is wrong

#!/usr/bin/perl -w use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $sendto = param('email'); my $sendname = param('fullname'); #my $logfile = 'http://learneasymoney.com/Logs/opt-in.txt'; my $logfile = '/tmp/opt-in.txt'; my $msg; if ( open LOG, '>>',$logfile ) { print LOG "$sendname,$sendto\n"; close (LOG); $msg = "$sendname $sendto written to $logfile"; } else { $msg = "File open Error: ".$!; } print header(),start_html() ,p($msg) ,a({-href=>'easy.html'},'return') ,end_html();
poj


Comment on Re: Nothing is being written into my opt-in.txt file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043572]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-12-27 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls