Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send Form to Database and email?

Posted on 2004-08-27
9
Medium Priority
?
365 Views
Last Modified: 2013-12-24
Is it possible to post form results to a database and send it to an email address? If so how do I do it?
0
Comment
Question by:annyearsley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 11924152
Take a look at MS KB article 288328

RCMB
0
 

Author Comment

by:annyearsley
ID: 11924606
I have read that one and several others that I am trying right now. I was just hoping it was as easy as clicking an option on the form properties dialog box.
0
 
LVL 12

Expert Comment

by:rcmb
ID: 11925701
Unfortunately it is not possible with FrontPage. Your problem is with the server extensions which will not allow you to send to email and an ASP page. Without the ASP page you cannot write to the database. You can use something like CDONTS to send your mail and then have the ASP to write to the database.

RCMB
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:annyearsley
ID: 11927581
I also have DreamWeaver MX 2004 and have been playing with ASP.net and PHP. Which one is the easiest to learn and run with DW? I am not much of a programmer, just a web designer. The easier the better! Thank you!
0
 
LVL 12

Expert Comment

by:rcmb
ID: 11927725
Not real familiar with PHP but it is suppose to be easier with DW than .net.

You can use just straight VBScript in ASP to create the solution you need. I have some stuff at work I can post tomorrow that will write to a database and send the email.

RCMB
0
 

Author Comment

by:annyearsley
ID: 11928116
You're great! I appreciate it.
Ann
0
 
LVL 12

Accepted Solution

by:
rcmb earned 1000 total points
ID: 11936508
Okay this is what you need to do.

Create a form in FP and have it post to an asp page.

In the asp page have the first section write your database information with a SQL insert statement.

Now in the same page include the following code after the database region end.

<%
'Use this section to create variables from your form to include in the e-mail
var12 = request.form("FirstName")
var34 = request.form("LastName")

' Send by connecting to port 25 of the SMTP server.
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP server.

With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
' Set your server IP address here
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.111.111.111"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10  
    .Update
End With

' Build HTML for message body.
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b>Create your message body here</b></br>"
strHTML = strHTML & "<b>Information Posted: "
strHTML = strHTML & var12
strHTML = strHTML & " "
strHTML = strHTML & var34
strHTML = strHTML & "</b>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

' Apply the settings to the message.
With iMsg
    Set .Configuration = iConf
    .To = "1234@mail.com"
    .Cc = "5678@mail.com"
    .From = "myaddress@mail.com"
    .Subject = "SOME SUBJECT LINE"
    .HTMLBody = strHTML
    .Send
End With

' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

response.redirect "confirmation.asp"

%>
0
 

Author Comment

by:annyearsley
ID: 11938293
Thanks a million. I am also going to take the SQL classes on VTC so I don't have to look like a dummy by asking questions!
Ann Yearsley
0
 
LVL 12

Expert Comment

by:rcmb
ID: 11939831
Do not be afraid to ask questions. You will never look like a dummy trying to learn more about designing the Internet.

Thanks for the points.

RCMB
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question