Print Page | Close Window

Shopping cart and Variables

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4528
Printed Date: 30 March 2026 at 10:07am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Shopping cart and Variables
Posted By: sprychun
Subject: Shopping cart and Variables
Date Posted: 25 July 2003 at 12:10pm

First question: What is the best way to go about having an insecure shopping cart? Cookies?
Second question: In an ASP page how can I carry a variable from one page to the next? Through a link?




Replies:
Posted By: Flamewave
Date Posted: 25 July 2003 at 12:48pm

For your first question, cookies would work, but I think using a database would be the best way. Even a text file on the server would work, although using a database is much better.

For your second question, you can use a querystring (get)/form (post), session variable, or a cookie. There may be other ways, but these are the most popular and easiest that I know of.



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.


Posted By: Mart
Date Posted: 25 July 2003 at 3:18pm
If you are making a shopping cart it might be worth having some security like basic database encryption and i would also advice not to use text files unless permissions deny directory listing and have encoding/encryption...


Posted By: sprychun
Date Posted: 25 July 2003 at 5:10pm
Thank you for the help! How do those GET POST commands look in code?


Posted By: Flamewave
Date Posted: 25 July 2003 at 9:32pm
The get and post were reffering to form actions, which is html. I don't think you can manually create a form variable without submitting a form, but you can manually make a querystring (also what a form uses when you use the get methood). Although you have to be careful with querystring variables has they are much eaiser to hack then form and session variables are.

-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.


Posted By: Mart
Date Posted: 26 July 2003 at 3:26am
file.asp is the file in which you want to retrive querystring variables in this example.  If  you goto file.asp?variable1=hello and in file.asp  put <%=request.querystring("variable1")%>  it  should  write  'hello'.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net