Link to home
Start Free TrialLog in
Avatar of jeffreychorba
jeffreychorbaFlag for United States of America

asked on

Mail form in go daddy

Can anyone help me with how to make an e-mail form work in go-daddy? I currently have fields created on the page and they allow me to inpu the text.  When I submitt the form it does get e-mailed where it is supposed to go but the data I entered does not show up in the e-mail, just the field names.  Can someone help?

Jeff

Avatar of bugs021997
bugs021997
Flag of India image

@jeffreychorba,

Post the code so we can check
Avatar of jeffreychorba

ASKER

<html>

<head>
<title>Kreco Antennas - Contact Us</title>

<STYLE TYPE="text/css">
<!--
A:link { text-decoration: none;
color: #666666;
font-family: Verdana; }
A:visited { text-decoration: none;
color: #666666;
font-family: Verdana; }
A:active {text-decoration: none;
color: #666666;
font-family: Verdana; }
A:hover {text-decoration: underline;
color: #222222;
font-family: Verdana; }
.style2 {
      font-family: Georgia, "Times New Roman", Times, serif;
      font-style: italic;
      font-weight: bold;
}
.style3 {font-family: Georgia, "Times New Roman", Times, serif}
.style4 {font-size: xx-large}
.style5 {color: #FFFFFF}
.style8 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; }
.style10 {
      font-size: medium;
      color: #FFFFFF;
      font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style11 {font-size: small; color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style13 {color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; }
-->
</STYLE>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table align="center" bgcolor="#4D5D6D" width="770" border="0" cellspacing="0" cellpadding="0" height="100%">
      <tr>
            <td height=75 colspan="7" valign=top>
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                        <td height=50><div align="center" class="style2 style4"><font color="#FFFFFF">Kreco Antennas </font></div></td>
                  </tr>
            </table>
            
            </td>
      </tr>
      <tr>
        <td width=160 height="16" valign="top" background="images/side.gif">&nbsp;</td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style8"><a href="index.htm"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Home</font></a></div></td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="catalog.htm" target="_self"><strong>Catalog</strong></a> </font></div></td>
        <td width="160" height="16" valign="top" background="images/button1.jpg"><div align="center" class="style8"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Contact Us </font></div></td>
         <td width=160 height="16" valign="top" background="images/side.gif">&nbsp;</td>
      </tr>
      <tr>
            <td height=3 colspan="7"></td>
      </tr>
      <tr>
            <td height="150" colspan="7"><div align="center"><img src="images/index.jpg" width="780" height="150"></div></td>
      </tr>
      <tr>
            <td height="200" colspan="7">
            
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="32%" height="222" valign="top"><div align="center"><em><font color="#FFFFFF" size="6" face="Verdana, Arial, Helvetica, sans-serif"><br>
                  Contact Us </font></em></div></td>
                        <td width="68%" valign=top><div align="justify">
                        <p>&nbsp;</p>
                        <p><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">
                      </font></p>
                        <table width="100%" border="0">
                  <tr>
                    <td width="24%"><p align="left" class="style10">Address:</p></td>
                    <td width="76%"><p class="style11">27 Spruce Cabin Road<br>
                      Cresco, PA 18326</p>
                    </td>
                  </tr>
                  <tr>
                    <td><p align="left" class="style10">Email:</p></td>
                    <td><p class="style13">name@emailaddress.com</p></td>
                  </tr>
                  <tr>
                    <td><p align="left" class="style10">Phone:</p></td>
                    <td><p class="style11">(570) 595-2212</p></td>
                  </tr>
                  <tr>
                    <td class="style10"><p align="left">Fax:</p></td>
                    <td><span class="style11">(570) 595-2024</span></td>
                  </tr>
                  <tr>
                    <td><br></td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="90" colspan="2" nowrap><p class="style10">                      Please fill out this form and we will<br>
                      get back to you shortly:<br>
                    </p></td>
                  </tr>
                  <tr>
<form action="gdform.asp" method="post">
<input type="hidden" name="subject" value="Antenna info request" />
<input type="hidden" name="redirect" value="contact.htm" />
<p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p>
<p>Company:<input type="text" name="Company" /></p>
<p>Address:<input type="text" name="Address" /></p>
<p>City:<input type="text" name="City" /></p>
<p>State:<input type="text" name="State" /></p>
<p>Zip:<input type="text" name="Zip" /></p>
<p>E-Mail Address:<input type="text" name="email" /></p>
<p>Phone Number:<input type="text" name="Phone Number" /></p>
<p>Fax Number:<input type="text" name="Fax Number" /></p>


<p>Your question or comment:<textarea name="comments" cols="40" rows="10">
Type comments here.</textarea></p>
<input type="submit" name="submit" value="submit"/>
</form>

      <tr>
            <td height="29" colspan="7"><div align="center"><img src="images/bottom.jpg" width="780" height="29" border="0"></div></td>
      </tr>
      <tr>
            <td height="48" colspan="7"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright 2004 KrecoAntennas.com<br>
        Site Created By: </font><span class="style5"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Technical Computer Services </font></span><font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
      </tr>
</table>


</body>
</html>
whats the contents of gdform.asp ?
<%

Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
host_url = Request.ServerVariables("HTTP_HOST")
req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("\ssfm")
dirname = filename
filename = filename & "\gdform_" & DatePart("M", dtNow) & DatePart("D", dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S", dtNow)

Function FormatVariableLine(byval var_name, byVal var_value)
      Dim tmpStr
      tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
      tmpStr = tmpStr & var_value & vbCRLF
      tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
      FormatVariableLine = tmpStr
end function

Sub OutputLine(byVal line)
   outfile.WriteLine(line)
end sub

if err.number = 0 then
      Set outfile = fso.CreateTextFile(filename, true, false)
      if err.number <> 0 then
                  bErr = true
                  errStr = "Error creating file! Directory may not be writable or may not exist.<br>Unable to process request."
      else
            if(req_method = "GET") then
                  for each Item in request.QueryString
                        if item <> "" then
                              bEmpty = false
                              key = item
                              value = Request.QueryString(item)
                              if(lcase(key) = "redirect") then
                                    landing_page = value
                              else
                                    line = FormatVariableLine(key, value)
                                    Call OutputLine(line)
                              end if
                        end if      
                  next
            elseif (req_method = "POST") then
                  for each Item in request.form
                        if item <> "" then
                              bEmpty = false
                              key = item
                              value = Request.form(item)
                              if(lcase(key) = "redirect") then
                                    landing_page = value
                              else
                                    line = FormatVariableLine(key, value)
                                    Call OutputLine(line)
                              end if
                        end if      
                  next
            end if
            outfile.close
      end if      
      if(bEmpty = true) AND errStr = "" then
            bErr = true
            errStr = errStr & "<br>No variables sent to form! Unable to process request."
      end if
      if(bErr = false) then      
            if (landing_page <> "") then
                  response.Redirect "http://" & host_url & "/" & landing_page
            else
                  response.Redirect "http://" & host_url      
            end if
      else
            Response.Write errStr
      end if      
      set fso = nothing
else
  Response.Write " An Error Occurred creating mail message. Unable to process form request at this time."
end if
%>
ASKER CERTIFIED SOLUTION
Avatar of bugs021997
bugs021997
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Bugs,

It does work good.  Is there a way to have it show the fields in the e-mail so they are not sorted in alphabetical order? ie (address is at the top)

Thanks,

Jeff