in reply to Subscription form script

You could use CGI::Validate to validate your form entries, although your current method is good too.

For validating ip_address and referrer, you could use this
$q->param('ip_address', $ENV{REMOTE_ADDR}); $q->param('referrer', $ENV{HTTP_REFERER});
to set the CGI parameters, then use CGI::Validate.

As for securing the files, why not just write 'newsletter.txt' outside the root of the webserver.

Replies are listed 'Best First'.
Re: Re: Subscription form script
by Anonymous Monk on Aug 06, 2003 at 12:16 UTC

    As for securing the files, why not just write 'newsletter.txt' outside the root of the webserver.

    Because on this server I don't have access anywhere else. I have a feeling that any other solution will be sub-optimal so I'll probably just switch hosting plans unless anyone has a bright idea.

    Thanks for the CGI::Validate link, I'll check it out :)

      I know on my apache server, any files that start with .ht (/^\.ht/) are filtered and never served out. If this is the case on your server perhaps .htnewsletter would work. Just a thought.