Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form mail

Status
Not open for further replies.

LDaveM

Vendor
Feb 12, 2002
336
US
I have the following script that doesn't work on a Windows server for a contact form.
Would some tell what we have done wrong?
Thanks,
Dave
<FORM ACTION="/cgi-bin/formmail.pl" METHOD="POST">
<INPUT TYPE=HIDDEN NAME="recipient" VALUE="mail@mydomain.com">
<DIV ALIGN=LEFT>
<P ALIGN=LEFT>
<TABLE WIDTH="760" CELLPADDING="0" CELLSPACING="0" BORDER="0" CLASS="header">
<TR>
<TD COLSPAN="2" WIDTH="12" VALIGN=BOTTOM CLASS="header">
<P>
<TABLE WIDTH="790" CELLPADDING="0" CELLSPACING="0" BORDER="0" HEIGHT="110">
<TR>
<TD HEIGHT="52" BGCOLOR="#144822" VALIGN=CENTER CLASS="header" BACKGROUND="images/Element1.jpg">
<P ALIGN=RIGHT>
<!-- $MVD$:spaceretainer() -->&nbsp;<BR>
<BR>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2">&nbsp;<FONT COLOR="WHITE">
| </FONT><A HREF="index.html"><FONT COLOR="WHITE">Home</FONT></A><FONT COLOR="WHITE"> |</FONT> <A HREF="contact.htm"><FONT COLOR="WHITE">Contact</FONT></A> <FONT COLOR="WHITE">|
</FONT><A HREF="aboutus.htm"><FONT COLOR="WHITE">About Us</FONT></A></FONT></FONT></B></TD>
<TD ROWSPAN="2" HEIGHT="110" VALIGN=CENTER>
<P>
&nbsp;</TD>
<TD HEIGHT="52" VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="31" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
<TR>
<TD HEIGHT="58" BGCOLOR="#9EDAFA" VALIGN=CENTER>
<P>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="6">Kinetica, Inc.</FONT></FONT></B><BR>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="3">ISO 17025 Certified
Thermoanalytical Testing Services for the Chemical Process Industry</FONT></FONT></B></TD>
<TD HEIGHT="58" VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="26" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
</TABLE><!--webbot bot="Include" i-checksum="6627" endspan --></TD>
</TR>
<TR>
<TD COLSPAN="2" WIDTH="12" VALIGN=CENTER>
<P>
<TABLE WIDTH="760" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD COLSPAN="4" VALIGN=CENTER>
<P>
&nbsp;</TD>
<TD COLSPAN="2" VALIGN=CENTER CLASS="body">
<P ALIGN=LEFT "CLASS="title&quot;">
<!-- $MVD$:spaceretainer() -->&nbsp;<BR>
<B><FONT FACE="Arial,Helvetica"><FONT COLOR="BLACK">CONTACT US</FONT></FONT></B><FONT FACE="Arial,Helvetica">&nbsp;</FONT></TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="23" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
<TR>
<TD COLSPAN="3" VALIGN=CENTER>
<P>
&nbsp;</TD>
<TD COLSPAN="3" VALIGN=CENTER>
<P ALIGN=CENTER>
<!-- $MVD$:spaceretainer() -->&nbsp;</P>
<P ALIGN=CENTER>
<FONT FACE="Arial,Helvetica"><FONT COLOR="#00007F"><FONT SIZE="3"><I><B>This
form is being revised - do not sub</B></I></FONT></FONT></FONT><I><B><FONT FACE="Arial,Helvetica"><FONT COLOR="#00007F"><FONT SIZE="3">mit</FONT></FONT></FONT></B></I><FONT FACE="Arial,Helvetica"><FONT COLOR="#00007F"><FONT SIZE="3"><I><B>.
Call 937-743-3082 or fax to 937-743-3652 for</B></I></FONT></FONT></FONT></P>
<P ALIGN=CENTER>
<FONT FACE="Arial,Helvetica"><FONT COLOR="#00007F"><FONT SIZE="3"><I><B>quotes
or additional information. Thank you for your patience</B></I>.</FONT></FONT></FONT></P>
<P ALIGN=CENTER>
<!-- $MVD$:spaceretainer() -->&nbsp;</TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="7" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD WIDTH="12" VALIGN=TOP>
<P>
<TABLE WIDTH="144" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD COLSPAN="3" VALIGN=CENTER>
<P>
<!-- row 1 -->&nbsp;</TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="7" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
<TR>
<TD VALIGN=CENTER>
<P>
<!-- row 2 -->&nbsp;</TD>
<TD BGCOLOR="#144822" VALIGN=TOP><DIV ALIGN=LEFT>
<P ALIGN=LEFT>
<TABLE WIDTH="127" CELLPADDING="0" CELLSPACING="0" BORDER="0" BACKGROUND="images/vert.jpg" STYLE="border-collapse: collapse" BORDERCOLOR="#111111">
<TR>
<TD BGCOLOR="#144822" VALIGN=CENTER BACKGROUND="vert.jpg">
<P ALIGN=RIGHT>
<!-- $MVD$:spaceretainer() -->&nbsp;</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><!--webbot bot="Navigation" S-Type="top"
S-Orientation="vertical" S-Rendering="graphics"
B-Include-Home="TRUE" B-Include-Up="FALSE" U-Page S-Target startspan --><nobr></FONT><A HREF="index.html"><FONT COLOR="WHITE">Home</FONT></A><FONT COLOR="WHITE"></nobr></FONT></FONT></FONT></B><BR>
</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><nobr></FONT><A HREF="services.htm"><FONT COLOR="WHITE">Testing
Services</FONT></A><FONT COLOR="WHITE"></nobr></FONT></FONT></FONT></B><BR>
</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><nobr></FONT><A HREF="quality.htm"><FONT COLOR="WHITE">Quality
Program</FONT></A><FONT COLOR="WHITE"> </nobr></FONT></FONT></FONT></B><BR>
</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><nobr></FONT><A HREF="new.htm"><FONT COLOR="WHITE">What's
New</FONT></A><FONT COLOR="WHITE"></nobr></FONT></FONT></FONT></B><BR>
</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><nobr></FONT><A HREF="special.htm"><FONT COLOR="WHITE">Special&nbsp;Testing</FONT></A><FONT COLOR="WHITE"></nobr></FONT></FONT></FONT></B><BR>
</P>
<DIV ALIGN=RIGHT>
<P ALIGN=RIGHT>
<B><FONT FACE="Arial,Helvetica"><FONT SIZE="2"><FONT COLOR="WHITE"><nobr></FONT><A HREF="location.htm"><FONT COLOR="WHITE">Location</FONT></A><FONT COLOR="WHITE"></nobr><!--webbot bot="Navigation" i-checksum="32552" endspan --></FONT></FONT></FONT></B></P>
</DIV>
<P ALIGN=RIGHT>
<!-- $MVD$:spaceretainer() -->&nbsp;</TD>
</TR>
</TABLE></TD>
<TD VALIGN=CENTER BACKGROUND="images/layout/layout_r5_c3.gif">
<P>
<IMG SRC="images/layout/layout_r5_c3.gif" WIDTH="12" HEIGHT="148" VSPACE="0" HSPACE="0" BORDER="0" NAME="nav_r2_c3"></TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="148" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
<TR>
<TD COLSPAN="3" VALIGN=CENTER>
<P>
&nbsp;</TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="8" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
<TR>
<TD COLSPAN="3" VALIGN=CENTER>
<P>
&nbsp;</TD>
<TD VALIGN=CENTER>
<P>
<!-- $MVD$:picsz("1","1") --><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="8" VSPACE="0" HSPACE="0" BORDER="0"></TD>
</TR>
</TABLE></TD>
<TD WIDTH="624" VALIGN=TOP><DIV ALIGN=LEFT>
<P ALIGN=LEFT>
<TABLE WIDTH="381" CELLPADDING="5" CELLSPACING="0" BORDER="0" CLASS="body">
<TR>
<TD WIDTH="78" VALIGN=TOP>
<P>
&nbsp;</TD>
<TD VALIGN=TOP></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Name</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_FullName" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Title</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_Title" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Organization</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_Organization" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Street Address</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_StreetAddress" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Address (cont.)</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_Address2" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">City</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_City" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">State/Province</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_State" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Zip/Postal Code</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_ZipCode" SIZE="12" MAXLENGTH="12"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Country</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_Country" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Work Phone</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_WorkPhone" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">FAX</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<P>
<INPUT TYPE=TEXT NAME="Contact_FAX" SIZE="25" MAXLENGTH="25"></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<P ALIGN=RIGHT>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Add</FONT></FONT><BR>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Your Comments</FONT></FONT><BR>
<FONT FACE="Arial,Helvetica"><FONT SIZE="2">Here</FONT></FONT></TD>
<TD WIDTH="283" VALIGN=CENTER>
<FORM ACTION="/cgi-sys/formmail.pl" METHOD="POST" ONSUBMIT="location.href=" /CGI-SYS/FORMMAIL.PL";RETURN FALSE;" WEBBOT-ONSUBMIT WEBBOT-ACTION="--WEBBOT-SELF--">
<INPUT TYPE=HIDDEN NAME="VTI-GROUP" VALUE="kinetica@thermochemistry.com">
<INPUT TYPE=HIDDEN NAME="recipient" VALUE="kinetica@thermochemistry.com">
<INPUT TYPE=HIDDEN NAME="recipient" VALUE="kinetica@thermochemistry.com">
<P>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><!--webbot bot="SaveResults" endspan i-checksum="43374" --></P>
<P>
<TEXTAREA NAME="S1" COLS="40" ROWS="6"></TEXTAREA></TD>
</TR>
<TR>
<TD WIDTH="78" VALIGN=CENTER>
<FORM ACTION="/cgi-sys/formmail.pl" METHOD="POST">
 
Chris, I'm not a programmer so if you could explain a liyttle more to me.
Also, this is the error that we rx. and one tries to send to form.
"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers."
Thanks,
Dave
 
in your code there is
Code:
<FORM ACTION="/cgi-bin/formmail.pl" METHOD="POST">
   <INPUT TYPE=HIDDEN NAME="recipient" VALUE="mail@mydomain.com">
then
Code:
            <FORM ACTION="/cgi-sys/formmail.pl" METHOD="POST" ONSUBMIT="location.href=" /CGI-SYS/FORMMAIL.PL";RETURN FALSE;" WEBBOT-ONSUBMIT WEBBOT-ACTION="--WEBBOT-SELF--">
             <INPUT TYPE=HIDDEN NAME="VTI-GROUP" VALUE="kinetica@thermochemistry.com">
              <INPUT TYPE=HIDDEN NAME="recipient" VALUE="kinetica@thermochemistry.com">
               <INPUT TYPE=HIDDEN NAME="recipient" VALUE="kinetica@thermochemistry.com">
                <P>
and
Code:
            <FORM ACTION="/cgi-sys/formmail.pl" METHOD="POST">
first thing needed is to clean that lot up or better still start again because M$ FP has really screwed it up.


Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
1. Form tags (and most other HTML tags, and ALL XHTML tags) must have an opening and closing. e.g.
Code:
<form action="" method="">
stuff...
</form>

2. The CGI error means that your PERL program (formmail.pl) didn't like what it got, or didn't produce what it's meant to. This could be because of the HTML used to create the form.

Start by creating a simple form with 1 or 2 fields and see if formmail will process that. This will tell you if it's you HTML or the PERL script that's at fault.

By "a simple form" I mean something like

Code:
<form name="testForm" action="/cgi-bin/formmail.pl" method="POST">
<input type="hidden" name="recipient" value="mail@mydomain.com" />
Name: <input type="text" name="fld_name" />
<input type="submit" name="submit" value="Send Mail" />
</form>

See what that does.

The more I looked at your code, the more it was apparent that you really haven't got to grips with HTML. I reccomend that you look up a couple of quick tutorials. It's not rocket science.
Try
Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
Code:
"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers."

The path to Perl is incorrect. Make sure the top line of your perl script says #!/perl/bin/perl.exe

What didn't you put in a ticket for this? [smile]

CliveC said:
1. your server appears to be down

No issues with the servers, none of our monitors triggered on any problems yesterday.

Wullie

Fresh Look - Quality Coldfusion/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top