Mark Wood
asked on
More ASP Help
I have site that needs to pass a variable between 3 pages. it passes fine from page 1 to page 2 but it won't pass to page 3. Can you help me figure out why?
On default.asp I have:
<% REFERER=Request.ServerVari ables("HTT P_REFERER" ) %>
<form action=verifypassword.asp? referer=<% response.w rite referer%> method=post> (which it does pass the variable)
On verifypassword.asp I have:
site = request.querystring("refer er")
response.redirect "memberpage.asp?referer=si te"
(this is where it fails)
It should carry the referer google.com through these pages so that i can create a link on page 3. it does work if i manually type in memberpage.asp?referer=goo gle.com
On default.asp I have:
<% REFERER=Request.ServerVari
<form action=verifypassword.asp?
On verifypassword.asp I have:
site = request.querystring("refer
response.redirect "memberpage.asp?referer=si
(this is where it fails)
It should carry the referer google.com through these pages so that i can create a link on page 3. it does work if i manually type in memberpage.asp?referer=goo
ASKER
Hey Carrzkiss,
We meet again .. hehe
What should happen is that it should simply pass the refering url through to the last page or page 3.
We meet again .. hehe
What should happen is that it should simply pass the refering url through to the last page or page 3.
See if this is what you are wanting to do?
http://ee.cffcs.com/Q_24373081/default.asp
code
http://ee.cffcs.com/Q_24373081/Q_24373081.asp
Good Luck, I have to leave out for a few hours, will check back in when I get back.
Have a gooe one.
Carrzkiss
http://ee.cffcs.com/Q_24373081/default.asp
code
http://ee.cffcs.com/Q_24373081/Q_24373081.asp
Good Luck, I have to leave out for a few hours, will check back in when I get back.
Have a gooe one.
Carrzkiss
ASKER
Here is all the code:
I just want to pass the referer
I just want to pass the referer
Default.asp
<% REFERER=Request.ServerVariables("HTTP_REFERER") %>
<form action=verifypassword.asp?referer=<%response.write referer%> method=post>
<div align="center">
<center>
<table border="0" cellpadding="2" cellspacing="3" width="300">
<tr>
<td><font face="Verdana" size="2">userName</font></td>
<td> <font face="Verdana" size="2"> <input type=text name=username ></font></td>
</tr>
<tr>
<td><font face="Verdana" size="2">Password</font></td>
<td> <font face="Verdana" size="2"> <input type=password name=password >
</font>
</td>
</tr>
<tr>
<td></td>
<td><font face="Verdana" size="2"><input type=submit value="Login">
</font><font face="Verdana" size="1"><a href="forgot.asp?mode=forgot">forgot password</a></font></td>
</tr>
</table>
<a href="signup.asp">New User signup here!</a></font>
</center>
</div>
</form>
verifypassword.asp
<%
email = trim(Request.form("username"))
password = trim(Request.form("password"))
if email = "" or password = "" then
Response.Write "please enter username and password"
else
ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/fpdb/gbserver.mdb")
set my_conn= Server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.RecordSet")
my_Conn.Open ConnString
set rscheck = my_conn.Execute ("Select * from member where email='" & email & "' and password='" & password & "'")
if rscheck.eof then
Response.redirect "signup.asp"
else
session("login") = "yes"
session("memberID") = rscheck("memberid")
session("websitename") = rscheck("websitename")
session("website") = rscheck("website")
session("name") = rscheck("name")
site = request.querystring("referer")
'response.write referer
Response.redirect "memberpage.asp?referer=site"
end if
RScheck.close
rs.Close
my_conn.close
set my_conn = nothing
end if
%>
memberpage.asp
<%referer = request.querystring("referer")%>
<p align="center"><font face="Verdana" size="2"><a href="<% response.write referer %>">Back to My Website</a> </font></p>
that is what the code does that I supplied.
It only passes the Referrer.
It only passes the Referrer.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Carrzkiss,
Thanks for the help so far but it still didn't work. Go to http://guestbook.tdwtech.com and use username: test@test.com and password: test and you will see what is happening. The verifypassword.asp only queries the db to see if you exist. If you don't exist it will redirect you to signup.asp but if you do exist it will redirect you to memberpage.asp.
Thanks for the help so far but it still didn't work. Go to http://guestbook.tdwtech.com and use username: test@test.com and password: test and you will see what is happening. The verifypassword.asp only queries the db to see if you exist. If you don't exist it will redirect you to signup.asp but if you do exist it will redirect you to memberpage.asp.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i was thinking about that when I saw it, but unable to fully test it, I was not sure.
Have a good one.
Carrzkiss
Have a good one.
Carrzkiss
ASKER
Thanks a lot for the help my friend..if you would like i would be happy to award you some points on this for your help.
You can accept yours http:Q_24373081.html?cid=1066#a24284800 as [Accepted]
and accept http:Q_24373081.html?cid=1066#a24281455 As [Assisted]
You do not get points for it, as it is your question.
Have a good one and may all our coding dreams come true.
Carrzkiss
and accept http:Q_24373081.html?cid=1066#a24281455 As [Assisted]
You do not get points for it, as it is your question.
Have a good one and may all our coding dreams come true.
Carrzkiss
Let me know?
Carrzkiss
Open in new window