in reply to Re^4: sendmail working for me but not another
in thread sendmail working for me but not another
I was using strict and warnings but I keep getting blank page or 404. I've been working on finding out what is causing it, but havn't been able to.
When you add strict, you need to declare your variables with my, as in my $fstname = substr param ('first'), 0, 40; (see Use strict and warnings). Also, note that CGI scripts can be run at the command line, as in perl script.cgi 'first=John&last=Doe&...', that way you'll see any error messages the script may be giving you (you might want to disable the email sending while testing, of course).
If I could get some kind of log, it would help but i'm still waiting on my host.
Yes, getting access to the server logs would be helpful (see also CGI Help Guide and Troubleshooting Perl CGI scripts). With my suggestion I meant that you could add code to your script that writes the data you've received to a log file as well (because POST data won't be in the server logs anyway), that way you still have a backup of the data in case someone submits the form and the email isn't sent out. (A database would be even better, but let's take it one step at a time :-) )
|
|---|