Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > asp form and html

Reply
Thread Tools

asp form and html

 
 
kburnam@gmail.com
Guest
Posts: n/a
 
      05-19-2006
Using the following code, all of these form elements are captured and
interpreted by my linked asp page on my server. all values are sent to
my email address successfully EXCEPT the email value. I cannot see why
this is. Here is my code:

<p>State:<br>
<input type="text" name="State">
<p>PostCode:<br>
<input type="text" name="PostCode">
<p>Email:<br>
<input type="text" name="email">


So I have a textbox, enter '(E-Mail Removed)' into the box, hit
submit button, and the only two that show up as values in the email are
State and PostCode. Why won't the emails be sent along with?


asp code:

Code:
<%

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
%>
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      05-19-2006
kburnam wrote:

> Using the following code, all of these form elements are captured and
> interpreted by my linked asp page on my server. all values are sent to
> my email address successfully EXCEPT the email value.


I don't know how -- none of the code you posted is capable of sending an
e-mail. It appears to be trying to log the form to a plain text file on
the server.

You'd probably be better off asking in a microsoft.* group anyway.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Asp.net web form and controls .vs html form and inputs Ellie ASP .Net 2 10-30-2008 01:04 PM
HTML Form inside ASP.NET form and fileupload admlangford@gmail.com ASP .Net 2 05-18-2008 07:42 AM
When JavaScript is disabled, do not display HTML form and form elements patricksabourin@hotmail.com Javascript 5 08-10-2006 05:32 AM
HTML form inside a ASP.NET form: CMS Mark ASP .Net 2 03-15-2006 07:38 PM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven ASP General 3 05-13-2004 12:15 AM



Advertisments