Being a bit of a novice to web design I have 2 quick questions if you'd be so kind guys:-
Expand|Select|Wrap|Line Numbers
- <table>
- <form action="testform.asp" method="post" >
- <tr><td colspan="2">
- <% If FormErrorsString = " ConnectionError " Then
- response.write "<font color=red>There is currently a problem with connecting to the database. Please try again later.</font>"
- Else
- response.write "Please enter your details here:"
- End If
- %></td>
- </tr>
- <tr>
- <td>Full Name:</td>
- <td><%
- If InStr(FormErrorsString, "$1$" ) Then
- 'display image
- Response.Write "<IMG SRC=""rejected.gif"" BORDER=""0"">"
- End If
- %></td>
- <td><input name="strname" value="<%request("strname" )%> " SIZE=50> </td>
- <td><%
- If InStr(FormErrorsString, "$1$" ) Then
- 'display image
- Response.Write "<h5 style=""color:red"">There is an error in this field, please rectify and submit again</h5>"
- End If
- %></td>
- </tr>
- ' ---------------------------
- ' Validation of script occurs
- <%
- Function ConfirmationEmail()
- dim objemail
- set objemail = Server.CreateObject("CDO.Message" )
- objemail.From = "test_test@testwebsite"
- objemail.To = request("stremailadd" )
- objemail.Cc = ";" & "nicholas.jones@xxxxxx.net"
- objemail.Subject = "test Confirmation"
- objemail.HTMLBody = "Thank you for submitting your details regarding the xxxxxxx with us."
- objemail.Send
- set objemail = Nothing
- End Function
- %>
I've tried putting:-
objemail.HTMLBody = "Thank you for submitting your details regarding the xxxxxxx with us."
objemail.HTMLBody = request("strname" )
objemail.HTMLBody = request("stremailadd" )
etc....
But it doesn't seem to work, any pointers would be lovely.
Expand|Select|Wrap|Line Numbers
- <tr>
- <td>Email Address:</td>
- <td><%
- If InStr(FormErrorsString, "$2$" ) Then
- 'display image
- Response.Write "<IMG SRC=""rejected.gif"" BORDER=""0"">"
- End If
- %></td>
- <td><input name="stremailadd" value="<% If request("stremailadd" ) <> "" and InStr(request("stremailadd" ), "@xxxxx.net" ) >3 Then
- response.write("stremailadd" )
- End If %>@xxxxx.net" SIZE=50>
- </td>
- <td><%
- If InStr(FormErrorsString, "$2$" ) Then
- 'display image
- Response.Write "<h5 style=""color:red"">There is an error in this field, please rectify and submit again</h5>"
- End If
- %></td>
- </tr>
Again, I can't see what to change to make it return the users email address.
Thanks, I'm tearing my hair out now!