Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple passing variables from flash to asp

Status
Not open for further replies.

guyphil

Programmer
Nov 2, 2004
27
IL
Hi

I'm creating a flash page with product links. The user clicks on a product and goes to a login page (asp page). after the username and password is entered the user goes to the selected product(also asp page). How do I pass on a variable from the product flash button (product #) so after he/she clicks on it they wont have to click again after login.
Is this clear?

Thanks,

Guy
 
You will have to pass the variables through in your ASP log in page. So if the link on the button is:

Code:
on(release){
    getURL("myASP.asp?prodID=1","POST");
}

One way to do it would be session variables. (this is probably how you are checking the log in right?!)

Sample ASP "router" page.

Code:
<%
productID = Request.Form("prodID")

session("productID") = productID

'evaluate the session and redirect based on that.

if session("logged") = "" then
   response.redirect("login.asp")
else
   response.redirect("productDetail.asp")
end if

So then on your product detail page you would check the session variable.
Code:
<%
productID = Session("productID")
%>

If you are not using session variables and you are going to log in every time you simply pass it through the login page. Example:

Code:
<%
'log in page.

productID = request.form("prodID")

%>

<html>
<form id="loginForm" action="login.asp" method="POST">
<input name="productID" type="hidden" value="<%=productID%>">
<input name="userID" type="text">
<input name="Pass" type="password">
<input name="submit" value="submit">
</form>
</html>

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top