When a new user is on policy.asp, and then clicks Accept the page stores the "refer" in a hidden field. BUT, when the new user is on register.asp, and by chance clicks the link at the top of the page...
[] All Forums
|
--[] Registration Rules and Policies Agreement <---<< here
|
-- Registration Form for strForumTitle
...it takes the user back to policy.asp. Then, -again- clicking Accept stores the "refer" - only this time register.asp gets stored.
Sure the easiest and quickest way to correct this is to remove the link at the top of the page.
But instead, I added an "IF... ELSE" statement in register.asp and it seems to have corrected the problem.
around line 372 in register.asp is where the check occurs:
======================================================
<% If strAutoLogon = 1 then
Response.Redirect "default.asp"
Else %>
<meta http-equiv="Refresh" content="2; URL=<%= Request.Form("refer")%>">
<% End if %>
<p align="center"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">
<a href="<%= Request.Form("refer")%>">Back To Forum</font></a></p>
======================================================
My solution: Check and make sure the new user doesn't have policy.asp OR register.asp stored as the "Refer".
======================================================
<% If strAutoLogon = 1 then
Response.Redirect "default.asp"
Else
If InStr(Request.Form("Refer"), "register.asp") <> 0 OR InStr(Request.Form("Refer"), "policy.asp") <> 0 then %>
<meta http-equiv="Refresh" content="2; URL=default.asp">
<p align="center"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">
<a href="default.asp">Back To Forums Homepage</font></a></p>
<% Else %>
<meta http-equiv="Refresh" content="2; URL=<%= Request.Form("Refer")%>">
<p align="center"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">
<a href="<%= Request.Form("Refer")%>">Back To Forum</font></a></p>
<% End If
End if
======================================================
So far, it seems to have corrected my problem and so far it works.
My question - Is this a proper way to handle the issue? Or will I see more problems by doing this, somewhere down the line... (?)