jennypretty
03-17-2009, 03:45 PM
Hello,
I have been trying to capture the email using SPLIT function. It worked. But it did not hold the value. I have been trying for a few days but it still didn't work.
I can see the value for oRs("Email"), but it didn't hold on the next page. The value should be in Response.Write(Mail), it showed nothing.
Here is what I did:
<%
'page1.asp
Dim strFirst, str2First, strSir, str2Sir
strFirst = Request("FullNames")
str2First = split(strFirst,", ")
strSir = Request("FullNames")
str2Sir = split(strSir, ", ")
%>
<input type="hidden" name="FName" value="<%=str2First(1)%>">
<input type="hidden" name="LName" value="<%=str2Sir(0)%>">
<%
Set oRs=Server.CreateObject("adodb.recordset")
strSQL = "select Email from tbl_cars " _
& " where Firstname = '" & str2First(1) & "' " _
& " and Surname = '" & str2Sir(0) & "' "
oRs.Open strSQL, myConn
if not oRs.eof then %>
<input type="hidden" name="strEmail" value="<%=oRs("Email")%>
<% end if%>
'page2.asp
<% Dim Mail
Mail = Request.Form("strEmail")
Response.Write (Mail)
%>
Can you please help?
What did I do wrong and how to modify it to hold the value of Response.Write(Mail)?
Thank you very much.
I have been trying to capture the email using SPLIT function. It worked. But it did not hold the value. I have been trying for a few days but it still didn't work.
I can see the value for oRs("Email"), but it didn't hold on the next page. The value should be in Response.Write(Mail), it showed nothing.
Here is what I did:
<%
'page1.asp
Dim strFirst, str2First, strSir, str2Sir
strFirst = Request("FullNames")
str2First = split(strFirst,", ")
strSir = Request("FullNames")
str2Sir = split(strSir, ", ")
%>
<input type="hidden" name="FName" value="<%=str2First(1)%>">
<input type="hidden" name="LName" value="<%=str2Sir(0)%>">
<%
Set oRs=Server.CreateObject("adodb.recordset")
strSQL = "select Email from tbl_cars " _
& " where Firstname = '" & str2First(1) & "' " _
& " and Surname = '" & str2Sir(0) & "' "
oRs.Open strSQL, myConn
if not oRs.eof then %>
<input type="hidden" name="strEmail" value="<%=oRs("Email")%>
<% end if%>
'page2.asp
<% Dim Mail
Mail = Request.Form("strEmail")
Response.Write (Mail)
%>
Can you please help?
What did I do wrong and how to modify it to hold the value of Response.Write(Mail)?
Thank you very much.