#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    4
    Rep Power
    0

    ASP/Frontpage Problem


    Im trying to make the data from a form go into a db, and also have part of the information sent via ASPMail to a form field. I set up the original form page with Frontpage's database wizard, then set my own confirmation page with the ASP code for the ASp mail. The problem Im having is that the confirmation page doesnt like request.form("profemail"). Ive checked the spelling 100 times so I know thats not it. If anyone could help, that would be great. Here is the confirmation page code below for those who are reading. Thanks in advance

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>

    <body>

    <p align="center">
    <%
    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.FromName = "Request Info"
    Mailer.FromAddress= "automailer@server.server.com"
    Mailer.RemoteHost = "server.server.com"
    Mailer.AddRecipient = "Professor", Request.form("profemail")
    Mailer.Subject = "Woohoo"
    Mailer.ContentType = "text/html"
    Mailer.BodyText = "Your widgets order has been processed!"
    if Mailer.SendMail then
    Response.Write "<p align=""center"">Thank you for your request.&nbsp; </p>" &_
    " <p align=""center"">As soon as your professor approves your request you will hear " & _
    "from an employee .</p>"
    else
    Response.Write "Mail send failure. Error was " & Mailer.Response
    end if
    %>
    </p>
    </body>

    </html>
  2. #2
  3. No Profile Picture
    Standards User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    146
    Rep Power
    12
    How is the form setup, or more inportantly when is the insert performed?

    I'll assume your form gets inserted on the 1st page, after which by the time your at the second page there's no form data to request as it's already been inserted to the db. Make sense?

    You could set a cookie to hold "profemail", then request the cookie in the ASP Mail code instead.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    5
    Rep Power
    0
    correct me if i'm wrong but shouldn't this:

    "Professor", Request.form("profemail")
    be concatenated together? like this:

    "Professor," & Request.form("profemail")
    or something to that effect...I don't know just a guess...
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    4
    Rep Power
    0
    Thanks for the replies. I was assuming also that the form had already been processed making request.form impossible to use. Anyway, Im going to scrap the frontpage db stuff and make my own asp page so I know what exactly is going on. Thanks for the help though.

    Drew

IMN logo majestic logo threadwatch logo seochat tools logo