Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    database IF command

    what is wrong with the code, I dont quite understand the syntax, or if there is anything missing:


    Dim ccmail
    if ccmail = ".@whatever.com" then return false
    else if ccmail = Request.Form("firstname") & "." & Request.Form("lastname") & "@whatever.com" then return true
    end if

    any idea how to make this work ?

    if the field is empty, because I use html the author will received an error email of @whatever.com. I rather have an if, so if no cc email is enter into the form, the @whatever.com does nothing, no email is sent.



    this is simplier and works but its 1 field with no html.

    Dim ccmail
    if ccmail = "" then
    ccmail = Request.Form("email")
    end if

  • #2
    New Coder
    Join Date
    Jun 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Also is it possible to include two in one. If these fiels are empty then grab these fields name instead otherwise.

    strEmail = Request.Form("firstname") & "." & Request.Form("lastname") & "@servername.ca"

    OR

    strEmail = Request.Form("firstname2") & "." & Request.Form("lastname2") & "@servername.ca"

    the form is built in two sections, so fields in section 2 is disable then email will not be sent without having a return address, I need to know how to have the option so that if section 2 is disable then grab the email in section 3.

    thanks for those who can help me out.

  • #3
    New Coder
    Join Date
    Jun 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i think I figure it out by doing it like so:

    Dim bccemail
    if bccemail = ".@servername.ca" then
    set bccemail = ""
    else bccemail = Request.Form("fname") & "." & Request.Form("lname") & servername.ca"
    end if

    but how would I put this together, one or the other:

    strFrom = Request.Form("email1") OR Request.Form("email2")


  •  

    Posting Permissions

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