title: Creating a contact form in Classic ASP
body: <p>I am forced to use Classic ASP for this project and for the most part it hasn't really been a problem for me, until now.  I am not familiar with ASP and all I'm trying to do is create a simple contact form.  Here is my markup:</p>
  
  <pre><code>&lt;form method="post" action="contactform_submit.asp"&gt;
      &lt;ol class="formset" style="padding: 0px; margin: 0px;"&gt;
          &lt;li&gt;&lt;label for="mbr-y"&gt;Are you currently a Walser Rewards Member?&lt;/label&gt; &lt;input class="mbr-yn" style="height: 13px; width: 13px" type="radio" name="mbr-y" value="Yes" /&gt; Yes &lt;input class="mbr-yn" style="height: 13px; width: 13px" type="radio" name="mbr-n" value="No" /&gt; No&lt;/li&gt;
          &lt;li&gt;&lt;label for="fname"&gt;Full Name: &lt;/label&gt;&lt;input id="fname" required="-1" name="fname" type="text" /&gt;
          &lt;ol id="member" class="formset" style="padding:0px; margin: 0px;"&gt;
              &lt;li&gt;&lt;label for="mbrnum"&gt;Member Number: &lt;/label&gt;&lt;input id="mbrnum" name="mbrnum" type="text" /&gt;&lt;/li&gt;
          &lt;/ol&gt;
          &lt;/li&gt;
          &lt;li&gt;&lt;label for="lname2"&gt;Phone Number: &lt;/label&gt;&lt;input id="phone" name="phone" type="text" /&gt;&lt;/li&gt;
          &lt;li&gt;&lt;label for="email2"&gt;Email Address: &lt;/label&gt;&lt;input id="email" name="email" type="text" /&gt;&lt;/li&gt;
          &lt;li&gt;&lt;label for="message"&gt;Message: &lt;/label&gt;&lt;textarea id="message" required="-1" value="" type="text" name="message"&gt;&lt;/textarea&gt;&lt;/li&gt;
      &lt;/ol&gt;
      &lt;input style="height: 33px; padding: 0px; margin-top: 7px; width: 120px;" src="/image/walsergold/send-btn.jpg" type="image" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have done some research, but it has been difficult for me to interpret how the ASP and HTML interact. I am hoping that if people are talking about my markup, it will be easier for me to understand. Can someone point me in the right direction of how "contactform_submit.asp" will look? Thank you.</p>
  
  <p>EDIT: From my research, I came up with this for "contactform_submit.asp" (it does not work):</p>
  
  <pre><code>&lt;%
  Dim mail, body
  
  body = "Current Member: " &amp; Request.Form("mbr-yn") &amp; vbcrlf &amp; vbcrlf &amp; "Member Name: " &amp; Request.Form("fname") &amp; vbcrlf &amp; vbcrlf &amp; "Member Number: " &amp; Request.Form("mbrnum") &amp; vbcrlf &amp; vbcrlf &amp; "Phone: " &amp; Request.Form("phone") &amp; vbcrlf &amp; vbcrlf &amp; "Email: " &amp; Request.Form("email") &amp; vbcrlf &amp; vbcrlf &amp; "Message: " &amp; Request.Form("message")
  
  Set mail = Server.CreateObject("CDO.Message")
  mail.To = "email@address.com"
  mail.From = "email@address.com"
  mail.Subject = "Online Contact Form"
  mail.TextBody = body
  mail.Send()
  
  Response.Write("Thanks for submitting the feedback. A Customer Service Specialist will be in contact with you shortly.")
  
  Set mail = nothing
  Set body = nothing
  %&gt;
  </code></pre>