Submit CDO

Results 1 to 5 of 5

Thread: Submit CDO

  1. #1
    Pete L Guest

    Default Submit CDO

    I would like the users of our intranet to be able to fill out a requistion form and when the Submit button is clicked the data would be saved to a db (access should be ok) and notify a person that I would have hard coded in the asp an email via CDO. After the mail has been sent i would like the result page say something like thanks for your request here is your ref numb: xxxx which is pulled from the database.<BR><BR>Any takers please?? thanks<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Submit CDO

    Hello! Here are some good articles that will help you out!@<BR><BR>Inserting Form Responses into Databases<BR>http://www.4guysfromrolla.com/webtech/040499-1.shtml<BR><BR>Sending Emails Using CDO<BR>http://www.4guysfromrolla.com/webtech/112298-1.shtml<BR><BR>Good luck, and Happy Programming! :)

  3. #3
    pete l Guest

    Default Submit CDO

    Thanks Scott but I need some more detailed example using them togethor as I described. Is this possible ?

  4. #4
    Mark Hoffman Guest

    Default RE: Submit CDO

    Pete,<BR><BR>Try something like this:<BR><BR>Set up an HTML page that gets the user&#039s info, or whatever.<BR>&#060;form name="neworder" METHOD="post" action="sendemail.asp"><BR>&#060;!-- Form stuff goes here --><BR>&#060;/form><BR><BR>Now, on the sendemail.asp page, you would have something like this:<BR><BR>&#060;%<BR>&#039 Read your variables from the form. (I don&#039t know what variables you have, so insert your own! These would be the input fields from the form.<BR><BR>Name = Request.Form("CustomerName")<BR>Phone = Request.Form("CustomerPhone")<BR><BR>&#039 Save information to a database. (Again, I&#039m just using example info.)<BR>&#039 Set the DSN to the DSN of your database.<BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "DSN=CustomerDB; uid=&#039&#039; pwd=&#039&#039"<BR>Conn.Execute ("INSERT INTO Customers VALUES(&#039" & Name & "&#039,&#039" & Phone & "&#039)<BR><BR>&#039 Email someone.<BR>Set mailer = Server.CreateObject("CDONTS.NewMail")<BR>mailer.Fr om="Pete L"<BR>mailer.to="john_doe@doe.com"<BR>mailer.body= "Your reference number is....."<BR>mailer.subject = "Thanks for your order"<BR>mailer.send<BR><BR>&#039 Now below the ending ASP tag, just put your HTML that says thanks for your order, etc...<BR>&#037;&#062;<BR><BR>That was pretty basic code that could be cleaned up a lot, but it should give you some ideas on where to research.<BR><BR>I hope this helps,<BR><BR>Mark Hoffman<BR>D Animation Multimedia and Web Design<BR>


  5. #5
    Join Date
    Dec 1969
    Posts
    511

    Default RE: Submit CDO

    Thank you kindly. Will give it a whirl.<BR>I appreciate your time in the response

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •