PDA

View Full Version : Form not sending values?? Rarrr



Lacuna
April 29th, 2005, 06:48 AM
Hey,

I've this form and I pretty near copied it from the other form I use that does work...however this lil'form has decided for no apparent reason that it doesn't want to let me know the values...

the html:


<form action="http://www.moov2.com/Consult/mailform.asp">
<div id="subHdr">Contact Form</div>
<hr color="#CCCCCC" noshade size="1">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name" class="sideBar"></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email" class="sideBar"></td>
</tr>
<tr>
<td>Tel:</td>
<td><input type="text" name="tel" class="sideBar"></td>
</tr>
<tr>
<td colspan="2">Comments:</td>
</tr>
<tr>
<td colspan="2"><textarea cols="16" rows="5" name="comments">...</textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" class="smBtn"></td>
</tr>
</table>
</form>


and the asp


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'e-mail link
Dim HTML, strName, strEmail, strTel, strComments, blnDone

'retrieve values from form
strName = request.Form("name")
strEmail = request.Form("email")
strTel = request.Form("tel")
strComments = request.Form("comments")

' on error resume next

HTML = "Name: " & strName & "<br />"
HTML = HTML & "Email: " & strEmail & "<br />"
HTML = HTML & "Phone: " & strTel & "<br />"
HTML = HTML & "<strong>Comments</strong><br />"
HTML = HTML & strComments

Set objMailMsg= Server.CreateObject("CDO.Message")
With objMailMsg
.From = "websitecontact@moov2.com"
.To = "andrea@moov2.com"
.Subject = "BSC - Contact requested via site."
.HTMLBody = HTML
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "217.33.105.140"
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Configuration.Fields.Update
.Send
End With

blnDone = "True"

Response.Redirect "http://www.moov2.com/Consult/Contact/"

%>


Anybody see where I messed up? Would be MUCH appreciated!!

~ Lacuna :love:

Lacuna
April 29th, 2005, 07:57 AM
and the answer is.... im foolish. :)

I didn't give the html form a method to post the information, which is a good reason why the .asp doesn't return any values!!

~ Lacuna :love:

abcdefg
April 29th, 2005, 09:37 AM
:)

DaveMania
April 30th, 2005, 01:02 PM
lol classic mistake. Frankly i think forms are annoying although i end up using them alot. specially when i'm making blog codes... grrr... stupid forms. There shouldbe a better type of form.