...

View Full Version : database IF command



zomby
12-05-2007, 02:39 AM
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

zomby
12-05-2007, 06:27 PM
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.

zomby
12-05-2007, 08:19 PM
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")



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum