I am still fairly new to programming Perl, but I have EXHAUSTED ALL MY RESOURCES in figuring out why the following script wont work. (Please remember when you first started..and try to explain it to me as if I was 5 years old). PLEASE HELP ME!!
The following script is meant to give a basic "Contact Us" form action and EMAIL ME the visitor's info. they entered on my form. The script does run..but the info. entered into the form DOES NOT show up in my e-mail. I have a great e-mail with pretty titles, but the info. does not show up...ALSO, when I run my Perl checker this error comes up: Use of uninitalized value in concatenation (.) or string at # URL of my script # line 12.
Please email me with any recommendations or post them here. (webmaster@prowebdesigner.net) Here is the script:
#!/usr/bin/perl -w print "Content-type:text/html\n\n"; $to='webmaster@prowebdesigner.net'; $from='webmaster@prowebdesigner.net'; $subject='Web Site Design Request'; $name = $formdata{'name'}; $email = $formdata{'email'}; $address1 = $formdata{'address1'}; $address2 = $formdata{'address2'}; $city = $formdata{'city'}; $state = $formdata{'state'}; $zip = $formdata{'zip'}; $homephone = $formdata{'homephone'}; $workphone = $formdata{'workphone'}; $business = $formdata{'business'}; $goals = $formdata{'goals'}; $comments = $formdata{'comments'}; open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL "Name: $name\n"; print MAIL "EMail: $email\n"; print MAIL "Address_line_1: $address1\n"; print MAIL "Address_line_2: $address2\n"; print MAIL "City: $city\n"; print MAIL "State: $state\n"; print MAIL "Zip: $zip\n"; print MAIL "Home_Phone: $homephone\n"; print MAIL "Work_Phone: $workphone\n"; print MAIL "Type_of_Business: $business\n"; print MAIL "Goals: $goals\n"; print MAIL "Comments: $comments\n"; close(MAIL); print "<html><head><title>Perl</title></head>\n<body>\n"; <p> print "YOUR potential business is VERY IMPORTANT to PRO WEB DESIGN. W +e will respond as soon as we can."; print "</body></html>";
janitored by ybiC: Retitle from less-than-descriptive-or-serachable "New to Perl..Don't laugh..PLEAZE HELP!!!", also minor format tweaks for legibility.
In reply to Hand-rolled CGI mailto by prowebdesigner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |