Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form

Status
Not open for further replies.

kaldag

MIS
Joined
Dec 2, 2002
Messages
24
Location
US
I have my results of a form sent to E-mail. The problem is all the results are in one long column. Is there any way to fromat the results so they would look something like a text document with more than one field to a line.

Name: Address: City: St: Zip:

Thanks

Ken
 
This may be a little late. I cut and pasted and reduced some code from a form our service guys use so you may want to replace the "Session"(s) with a "Request.Form". This page was coming a page that takes form input data and places it into Session objects for later use (updating a database). The Email message page(included below)is in the middle of this sequence in case some parts need to be ordered asap. This example looks like a table on a web page with a border and cells side by side. Your page(s) will need to have an .asp extension.

<%

HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Email Message Page</title>"
HTML = HTML & "<style>"
HTML = HTML & "<!--"
HTML = HTML & "body, td { font-family:Verdana; font-size:9pt }"
HTML = HTML & "-->"
HTML = HTML & "</style>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"

HTML = HTML & "<div align=""center"">"
HTML = HTML & "<table border=""1"" cellpadding=""4"" width=""90%"">"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""100%"" align=center colspan=""4""><b>" & "Company Information" & "</b></td>"
HTML = HTML & "</tr>"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""25%"">" & "Company Name:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("cname") & "</td>"
HTML = HTML & "<td width=""25%"">" & "Company Address:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("caddr") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""25%"">" & "City:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("city") & "</td>"
HTML = HTML & "<td width=""25%"">" & "State:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("state") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "</tr>"
HTML = HTML & "<td width=""50%"" colspan=""2"">" & "Remarks:" & "</td>"
HTML = HTML & "<td width=""50%"" colspan=""2"">" & Session("rmks") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "</table></div>"

HTML = HTML & "</body>"
HTML = HTML & "</html>"

Dim MailObject
Set MailObject = Server.CreateObject("CDO.Message")
MailObject.From = "us@here.com"
MailObject.To = "someone@somewhere.com"
MailObject.Cc = "someone@somewhere.com"
MailObject.Subject = "Company Online Infomation"
MailObject.HTMLBody = HTML
MailObject.Send
Set MailObject = Nothing

Response.Redirect "responsemesg.asp"

%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top