dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Lol Ok A Real Problem

  1. #1
    Join Date
    Feb 2003
    Location
    Sault Ste Marie, On, Canada
    Posts
    168

    Lol Ok A Real Problem

    OK TOLD YOU I WOULD GET A PROBLEM WITH THIS DAM EMAIL THING. THIS IS WHAT WORKS, EVERYTHING BUT THE EMAILING PART. I'M KIND OF NEW AT THIS BUT BEAR WITH ME PLZ.


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>WELCOME TO THE REGISTRATION FORM</title>
    </head>

    <body background="REGISTRATIONBACKG.jpg">
    <%
    '------------------this is an if statment for postback--------------------
    val = request.form("val")
    if val = "" then
    '-----------------this is the form--------------------------------------
    %>

    <form method="POST" action="Hunt_Registration.asp">
    <p><img border="0" src="HUNTER%20REGISTRATIONPIC.gif" width="334" height="16"></p>
    <p>HUNTER ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;
    <input type="text" name="Hunt_Id" size="20">&nbsp;&nbsp;<img border="0" src="deergun.gif" width="147" height="60"></p>
    <p>
    HUNTER PASSWORD <input type="text" name="Hunt_Password" size="20"></p>
    <p>FIRST NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_First_Name" size="20">&nbsp;&nbsp;</p>
    <p> LAST
    NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Last_Name" size="20"></p>
    <p>COUNTRY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Country" size="20">&nbsp;&nbsp;</p>
    <p>
    PROVINCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Province" size="20"></p>
    <p>STATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp; <input type="text" name="Hunt_State" size="20"></p>
    <p>City&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_City" size="20"></p>
    <p>Street
    Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
    <input type="text" name="Hunt_Street_Name" size="20"></p>
    <p>Street
    Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Street_Num" size="20"></p>
    <p>Apartment Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="Hunt_Appt_Num" size="20"></p>
    <p>Postal
    Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Postal" size="20"></p>
    <p>Zip
    Code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_zip" size="20"></p>
    <p>Telephone Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="Hunt_Telephone_Num" size="20"></p>
    <p>WHAT IS YOUR FAVORITE ANIMAL TO HUNT&nbsp; <select size="1" name="FAV_HUNT">
    <option>GOOSE</option>
    <option>DUCK</option>
    <option>DEER</option>
    <option>MOOSE</option>
    <option>BEAR</option>
    <option>TURKEY</option>
    </select></p>
    <p>EMAIL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="Hunt_Email" size="20"></p>


    <p><input type="submit" value="Submit" name="Submit"></p>
    </form>

    </body>

    </html>
    <%
    '----------------if the form has been submitted to its self then run this code-------------------
    else
    '--------------------request the form elements and write to variables----------------------
    Hunt_First_Name = Request.Form("Hunt_First_Name")
    Hunt_Email = Request.Form("Hunt_Email")


    Dim ObjMail
    '-------------------setup the CDONTS email object-------------------------------------
    Set ObjMail = Server.CreateObject("CDONTS.NewMail")
    '------------------------Set the email elements------------------------------
    ObjMail.To = ""& Hunt_Email &""
    ObjMail.CC = ""& Hunt_Email &""
    ObjMail.From = "NorthshoreAdventures@sympatico.com"
    ObjMail.Subject = "You have registered"
    thebody = "Name:"& Hunt_First_Name&"" & vbcrlf
    '----------------create the body of the message------------------------
    thebody = thebody & "Email: "& Hunt_Email &"" & vbclf
    thebody = thebody & "Subject: "& Hunt_First_Name &""
    ObjMail.Body = thebody
    '----------------------send the message-----------------------------------
    ObjMail.Send
    Set ObjMail = Nothing
    '---------------------insert the information into the database------------------------
    ' it connects to my registration asp to insert into database or should
    '----------------------end if the if statement----------------------------
    end if

    %>

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    hi,
    what does the error say?

    try adding in the following code to display the error with the email:
    <% if err.number > 0 then
    response.write "error sending message" & Err.Description
    else
    response.write "message sent"
    end if
    %>

    Then post the error message.

  3. #3
    Join Date
    Feb 2003
    Location
    Sault Ste Marie, On, Canada
    Posts
    168
    HEY I REALLY APPRECIATE THE HELP BUT I ACTUALLY GOT IT WORKING. LOL BUT IF YOU COULD CHECK OUT MY POST ON
    "CAN YOU HELP ME OUT" I WOULD LIKE TO LEARN SOMETHING ELSE. THX. YOU GUYS WILL HAVE ME BEING AN ASP EXPERT IN NO TIME LOL.

    ALEX

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles