Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 romping around the Monastery: (7)
As of 2015-07-03 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls