Hi there, I have a form that users can fill out to view a demo. When they fill out this form it puts their info in the DB and also checks to see if they have already asked for a demo. This then sends out an email to me with their info so that I know that the got to the demo page. What I need to do now is to repost that same information to another IP address. Can anyone help with this?
here is the current code
<%
If Trim(Request("cmdAction"))
= "email" Then
Dim frm_firstname: frm_firstname = Trim(Request("frm_firstnam
e"))
Dim frm_lastname: frm_lastname = Trim(Request("frm_lastname
"))
Dim frm_title: frm_title = Trim(Request("frm_title"))
Dim frm_company: frm_company = Trim(Request("frm_company"
))
Dim frm_email: frm_email = Trim(Request("frm_email"))
Dim frm_telephone: frm_telephone = Trim(Request("frm_telephon
e"))
Dim frm_besttimetocall: frm_besttimetocall = Trim(Request("frm_besttime
tocall"))
'Saving the User to the database
Set rs=server.createobject("AD
ODB.Record
set")
strSQL = "SELECT Email, User_ID FROM Users WHERE Email = '" & frm_email & "'"
rs.open strSQL, cnn, 0
'The user doesn't exist yet.
IF Rs.EOF Then
Rs.close
Rs.open "Users", cnn, adOpenKeyset, adLockPessimistic, adCmdTable
Rs.AddNew
Rs("First_Name") = parseSQL(frm_firstname)
Rs("Last_Name") = parseSQL(frm_lastname)
Rs("Company") = parseSQL(frm_company)
Rs("Referred") = ""
Rs("Phone") = parseSQL(frm_telephone)
Rs("Email") = parseSQL(frm_email)
Rs("Country") = ""
Rs("Organizational_Area") = ""
Rs("Knowledge_Type") = ""
Rs("Knowledge_Product") = ""
Rs("Improve") = ""
Rs("Modified_Date") = Now()
Rs.Update
Rs.Close
strSql = "SELECT User_ID FROM Users WHERE Email = '" & frm_email & "'"
Rs.open strSQL, cnn, 0
User_ID = rs("User_ID")
Rs.close
Session("Login") = True
Rs.open "User_Login", cnn , adOpenKeyset, adLockPessimistic, adCmdTable
Rs.AddNew
rs("User_ID") = User_Id
Rs("Modified_Date") = Now()
Rs("Browser") = request.ServerVariables("H
TTP_USER_A
GENT")
Rs.Update
Rs.Close
set Rs = Nothing
Dim strBody
strBody = ""
strBody = "Demo site at " & Now() & VbCrLf & VbCrLf
strBody = strBody & "Name: " & frm_firstname & " " & frm_lastname & vbCrlf & VbCrLf
strBody = strBody & "Title: " & frm_title & vbCrlf & VbCrLf
strBody = strBody & "Company: " & frm_company & vbCrlf & VbCrLf
strBody = strBody & "Phone number: " & frm_telephone & vbCrlf & VbCrLf
strBody = strBody & "Email address: " & frm_email & vbCrlf & vbCrlf & VbCrLf
strBody = strBody & "Best time to call " & frm_besttimetocall & vbCrlf & VbCrLf
Dim objMail
Set objMail = Server.CreateObject("Persi
ts.MailSen
der")
objMail.Host = "mail.demo.com"
objMail.Port = 25 ' Optional. Port is 25 by default
objMail.From = "demo@demo.com"
objMail.FromName = "Demo Web Site" ' Optional
objMail.AddAddress "demo1@demo.com"
'objMail.AddAddress "demo@demo.com"
objMail.Subject = "Demo Web Site"
objMail.Body = strbody
'On Error Resume Next
objMail.Send
'Response.Write Err.number & "=" & Err.Description
IF Err <> 0 THEN
Response.Write "<font color='red' size='+2'>There was an error sending your request: " & Err.Description & "</font>"
Err.Clear
Response.End
End If
Set objMail = Nothing
msg = "Thank you for registering for the demo. If you do not see the demo open " & _
" on your screen then you may have a pop-up blocker that is preventing it from " & _
" displaying.<P>Please <a href='Demo_main.swf'>click
here</a> to launch the demo in your browser window."
%>
<SCRIPT language="javascript">
OpenWindow()
</SCRIPT>
<%
Else
Session("Login") = false
msg = "You have already registered to view the demo. Please <a href='login.asp'>Click Here</a> to login and view the demo."
End If
End IF
%>
Start Free Trial