CGI Email Subscribe
CGI
Download (.zip)
#!perl #save_file.pl read(STDIN, $buffer,$ENV{'CONTENT_LENGTH'}); $buffer =~ tr/+/ /; $buffer =~ s/\r/ /g; $buffer =~ s/\n/ /g; @pairs = split(/&/,$buffer); foreach $pair(@pairs){ ($key,$value)=split(/=/,$pair); $formdata{$key}.="$value"; } $first=$formdata{'first'}; $last=$formdata{'last'};
open(INFO, ">>user.list"); # Open for appending print INFO "$first|$last\n"; close (INFO);
print "Content-type:text/html\n\n"; #Content Header
print <<End_of_Doc; <html> <head><title>Sample Response Page</title></head> <body bgcolor=maroon text=white> <center> <h1>Your email <FONT color=#ffebcc><I>$last</I></FONT> has been wrritten to the list</h1> <BR> <FONT face=Verdana size=3><B> Thank you for the submition <I>$first</I>.</B><P><BR> <A href="http://192.168.196.128/index.html"><FONT face=Verdana size=2 color=white> Click here</A> to return the main page</A> </body> </html> End_of_Doc
|