473,543 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Order of data from Form Fields

Dear All, I have an odd problem. I am using the asp code below to loop
through a form and get the data sent out in an email... however the
data from the form arrives out of order. Can any one suggest how to put
the data in the same order as the form?

<%
Dim objMail
Set objMail = CreateObject("C DONTS.Newmail")
objMail.TO = "us**@xyz.com.a u"
objMail.From = Request.Form("E mail")
objmail.Subject = "Booking Request from XYZ Web Site"
objMail.MailFor mat = cdoMailFormatMi me
objMail.BodyFor mat = cdoBodyFormatHT ML

sMailBody = sMailBody &"<html><bod y>"
For each item in Request.Form
if item <> "submit" then
if item <> "clear" then
sMailBody=sMail Body & item & ": " & Request.Form(it em) & "<br>"
end if
end if
next
sMailBody = sMailBody &"</body></html>"

objMail.Body = sMailBody
objMail.send
set objMail = Nothing
%>

Jul 22 '05 #1
1 1385
http://www.aspfaq.com/show.asp?id=2036

Bob Lehmann

"Peter" <dy************ *@hotmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
Dear All, I have an odd problem. I am using the asp code below to loop
through a form and get the data sent out in an email... however the
data from the form arrives out of order. Can any one suggest how to put
the data in the same order as the form?

<%
Dim objMail
Set objMail = CreateObject("C DONTS.Newmail")
objMail.TO = "us**@xyz.com.a u"
objMail.From = Request.Form("E mail")
objmail.Subject = "Booking Request from XYZ Web Site"
objMail.MailFor mat = cdoMailFormatMi me
objMail.BodyFor mat = cdoBodyFormatHT ML

sMailBody = sMailBody &"<html><bod y>"
For each item in Request.Form
if item <> "submit" then
if item <> "clear" then
sMailBody=sMail Body & item & ": " & Request.Form(it em) & "<br>"
end if
end if
next
sMailBody = sMailBody &"</body></html>"

objMail.Body = sMailBody
objMail.send
set objMail = Nothing
%>

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5878
by: Daniel Ruscoe | last post by:
Hi chaps, I'm relatively new to the language, but I want to create a simple order form using PHP and cookies. Please let me know if there's a better way in this situation, database isn't availible. What I'm trying to get is this: 1) Variable(A) passed from HTML page to script. 2) Script checks for cookie.
7
3640
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc. And i have things to offer, and to request. And a lot of ideas, but who needs them.... here's an example (from type_struct.py):
1
1764
by: shank | last post by:
I need advice on how to get started with this project. I want a page where a user can manually enter an order. Our users know our order# system and it's much easier to manually enter items as opposed to using a shopping cart and flipping through multiple pages. On the page would be the following.... 1) Billing address 2) shipping address...
2
1493
by: Bob Lehmann | last post by:
I know that the order of from fields from a form post are somewhat random. But, what about fields that have the same name - <input type="text" name="something" value=""> First Choice <input type="text" name="something" value=""> Second Choice <input type="text" name="something" value=""> Third Choice <input type="text" name="something"...
3
1417
by: Tim Chmielewski | last post by:
For an auto-generated form I have the following order of fields: savevalues userid productcode PrintColour1_1 Colour1_1 Quantity_1 " " " " " " " " PrintColour1_5 Colour1_5 Quantity_5
8
6801
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to be filled in, one of which is a date field. right now, i've been using this db myself and have entered only 10 days of sample data to check my...
2
1863
by: Jan | last post by:
In a 2-page order form, not all applicants will complete it due to field validations. If I want to see data from incomplete orders, can this be done using some sort of session control so that each form page data saved (each press on submit will save data to disk) will have a session number attached to it? Thus if the order log contains...
6
2575
by: Index | last post by:
Hi, I have a file which I want to sort depending on multiple columns. Actually I want to implement the following query through programming: SELECT SUM(VALUES) GROUP BY x,y ORDER BY x,y; the aggregation is complete.What I want is to order the result.I have 7 fields which are used in GROUP BY clause and I need to ORDER them with those...
3
1853
by: itsjules | last post by:
I have created HUGE order forms for a client using HTML (Dreamweaver Studio MX 2004) for the forms and ASPMail for the submission of the forms. Everything works fine, except ALL the fields are submitted with every order, and I want ONLY the fields that have something in them to be submitted. Right now my client gets a huge list of all the...
0
7354
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7693
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5888
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5282
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4898
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3394
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3394
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
643
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.