Email submit form?  | | |
March 10th, 2003, 12:09 PM
|
#11 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
| |
| |
March 10th, 2003, 12:42 PM
|
#12 (permalink)
| | Rather Large Member
Join Date: Oct 2001 Location: Vernon, BC, Canada
Posts: 9,244
|
If you're interested in taking a look see, I re-published an old clients pages. It uses html form submit. It took me 5 days to create the forms process. I couldn't find a free cgi script to do the work for me at the time so I created the html form submit instead. Most of the forms work is done on the Products page.
Here is the link: http://www.beemerworld.com/stopslip
The Inquiries button on the Products page will give you a page that the source code is easily read.
The products page gives you redirects and form submits with predetirmined subject line for easy order taking.
I can make a zip file of the site so you can put it on your own machine to try out different aspects of the forms included. Only a single folder is necessary as all files are in one directory.
Cheers! |
| |
March 10th, 2003, 12:50 PM
|
#13 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
|
edit ....... was double post.......
Last edited by crouse : March 10th, 2003 at 12:57 PM.
|
| |
March 10th, 2003, 08:15 PM
|
#14 (permalink)
| | Ultimate Member
Join Date: Nov 2002 Location: Boise, Idaho
Posts: 2,782
|
Ok the free link posted above gives a warning when you hit submit that goes somewhat as follows:
This may be a scam dont give out your creditcard info lkjf;lakdjf;laksdjf;akdfj
Continue.
Turn back.
If some one were to see that they would probably be scared off. I dont want that.
PyroSama
__________________
JOIN [FaD] | TEAM NUMBER 2037 | http://www.techimo.com/forum/t121132.html
|
| |
March 10th, 2003, 08:48 PM
|
#15 (permalink)
| | Ultimate Member
Join Date: Nov 2002 Location: Boise, Idaho
Posts: 2,782
|
Beemer just read your post. Sure could you email it to pyrosama@msn.com ?
Thanks
PyroSama |
| |
March 10th, 2003, 09:42 PM
|
#16 (permalink)
| | Rather Large Member
Join Date: Oct 2001 Location: Vernon, BC, Canada
Posts: 9,244
|
I'll zip it and send it along. You can decypher the source code?
Cheers! |
| |
March 16th, 2003, 01:19 PM
|
#17 (permalink)
| | Rather Large Member
Join Date: Oct 2001 Location: Vernon, BC, Canada
Posts: 9,244
|
Were you able to find what you want out of my code?
Cheers! |
| |
April 21st, 2003, 06:22 PM
|
#18 (permalink)
| | Junior Member
Join Date: Apr 2003
Posts: 1
|
contact.cgi
copy and paste between dotted lines
-----------------------------------------------------
#!/usr/bin/perl
require "subparseform.lib";
&Parse_Form;
print "Content-type: text/html\n\n";
if ( $input{'DEBUG'} ) {
foreach $key (sort keys(%input)) {
print "<P>The field named <B>$key</B>
contained <B>$input{$key}</B>";
}
}
$email="name@site.com";
$subject="Site Contact Request";
# if ( $input{'Name'} && $input{'Company'} && $input{'address1'} && $input{'city'} && $input{'state'} && $input{'zip'} && $input{'country'} && $input{'phone'} ) {
#open(MAIL, "|mail -s $subject $email");
open(MAIL, "|/usr/sbin/sendmail -t");
print MAIL "To: $email\n";
print MAIL "From:www.site\n";
print MAIL "Subject:Contact_Request\n";
print MAIL<<ENDMAIL;
New Contact Request from Site website..
Name ========> $input{'Name'}
Title ========> $input{'Title'}
Company ========> $input{'Company'}
Address 1 ========> $input{'address1'}
Address 2 ========> $input{'address2'}
City ========> $input{'city'}
State/Province ========> $input{'state'}
Zip/PC ========> $input{'zip'}
Country ========> $input{'country'}
Phone ========> $input{'phone'}
Fax ========> $input{'fax'}
Email Address ========> $input{'email'}
Interests ========> $input{'interests'}
Interests Description ========> $input{'interest-desc'}
Type of Industry ========> $input{'type'}
Type Description ========> $input{'type-desc'}
Comments ========> $input{'Comments'}
ENDMAIL
close (MAIL);
print << "HTMLCODE";
<body bgcolor="#333333" text="#cccccc" onLoad="setTimeout('window.history.go(-1)',3000)">
<table cellspacing="4" cellpadding="4" border="0">
<tr>
<td colspan="3" align="left">
<font face="verdana,arial,helvetica" size="2">
<b>
<br><br><br><br><br><br>
Thank you $input{'Name'} We'll contact you soon.</b></font>
</td>
</tr>
<!--
<tr>
<td><a href="javascript:window.close();">Close this window.</td>
</tr>
-->
</table>
</body>
HTMLCODE
# }
# else {
# print << "REQUIRED";
# <h2> You must complete following fields</h2>
# <UL>
# <li> Name
# <li> Company
# <li> Address 1
# <li> City
# <li> State/Province
# <li> Zip/P.C.
# <li> Country
# <li> Phone
# </UL>
# <a href="contact.shtml">Back</a>
# REQUIRED
# }
-----------------------------------------------------------------------
Maybe this is what you're looking for?
You'll also need the "subparseform.lib"
-----------------------------------------------------------------------
sub Parse_Form {if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); if ($ENV{'QUERY_STRING'}) { @getpairs =split(/&/, $ENV{'QUERY_STRING'}); push(@pairs,@getpairs); } }else { print "Content-type: text/html\n\n"; print "<P>Use Post or GET"; }foreach $pair (@pairs) { ($key, $value) = split (/=/, $pair); $key =~ tr/+/ /; $key =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/<!--(.|\n)*-->//g;if ($input{$key}) { $input{$key} .= ", $value"; }else { $input{$key} = $value; }}}1;
--------------------------------------------------------------------- |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |