Answer 1 out of 1
 
18 helpful answers

Born. Having the time of my life. Will die.

A:

Hi This is your form (I kept it as simple as possible)



<html>
    <head>
        <title>Form</title>
    </head>
    <body>
        <form action="form.asp" method="post">
            Your name: <input type="text" name="fname" size="20" />
            <input type="submit" value="Submit" />
        </form>
    </body>
</html>


This is your form.asp (the action target of the form above).

<%
' Get the value of the field fname in the form above into a variable we declare
dim fname
fname = Request.Form("fname")

Set myMail = CreateObject("CDO.Message")
myMail.Subject = "Your first name"
myMail.From = "mymail@mydomain.com"
myMail.To = "someone@somedomain.com"
myMail.TextBody = "Your first name is: " & fname
myMail.Send
set myMail = nothing

' this is a connection to an Access database
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "X:/somewhere/yourdatabase.mdb"

' This is the SQL
sql="INSERT INTO tablename (firstName)"
sql=sql & " VALUES "
sql=sql & "('" & fname  & "')"

' This execute the sql anc close the connection
on error resume next
conn.Execute sql,recaffected
conn.close
%>
Posted 3 years ago
ravidor was invited by Yedda to answer this question.

 
Comment About This Answer (or add your own answer)

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
ADVERTISEMENT
AOL Autos Q&A is powered by Yedda an AOL Company
Copyright © 2006-2010, Yedda Inc. and respective copyright owners