#!/usr/bin/perl $username="aaaa"; $domainname="aaa.com"; $datafile="/usr/home/cart/merchant.dat"; $mail_agent="/usr/lib/sendmail"; use CGI; $entry = new CGI; $|=1; print $entry->header; print $entry->start_html("Check out"); open(record,">>$datafile") || die "can't open test.dat"; @p=$entry->param; for($i=0;$i<=$#p;$i++) { if($entry->param($p[$i]) ne '') { print record $p[$i],":",$entry->param($p[$i]),"\r\n"; } else { print record $p[$i],":","NA\r\n"; } } print record "\n"; close(record); $cardsv_email="$username\@$domainname"; open(MAIL,"|$mail_agent -t $cardsv_email") || die "can not send mail"; print MAIL <<"THEEND"; From: shoppingcart\@$domainname To: $cardsv_email Subject: Online Order THEEND for($i=0;$i<=$#p;$i++) { print MAIL $p[$i],":", $entry->param($p[$i]),"\r\n"; } close(MAIL); print <<"THEEND"; Thank you for shopping with us
Make your own free website on Tripod.com