ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - 301 Redirect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

301 Redirect

 Post Reply Post Reply Page  <12
Author
Message
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2010 at 10:39am
Thanks for the help Greg. I'm implementing the pages that need to be re-directed right now and it works as it should.
It's a good feeling to know that I'm "safe" now
Thanks!!!
Back to Top
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2010 at 1:45pm
Isn't the native ProductCart variable pIdCategory category already sanitized?

*edit*

Not to confuse anyone... Greg's solution is completely secure and I'm sure the processor overhead for such a simple calculation is minimal. However, it seems a bit redundant to have two variables holding the same number.

Edited by Brett - 03-June-2010 at 2:18pm
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 03-June-2010 at 2:50pm
I was responding to the code he posted and wanted to point out the importance that when he is dealing directly with querstring variables the need for caution.
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 19-August-2010 at 2:38pm
Additional question to this issue...
While the given code works perfectly (thanks Greg!), I'm wondering if the following would be an option.

Say I have 5 categories: 120/121/122/123/124
I could write the code for each single line, but could it be made more simple by doing something like:
If idCategory >119 AND idCategory < 125 Then
.... [action to be taken] .....

I know I prob. have to convert the string to a number, but not sure on these things.
Somehow I have a feeling this should be simple to do?

It sure would save a lot of coding!

------ EDIT ------
Found the solution Wink

Dim idCategory
idCategory = Cint(getUserInput(Request("idCategory"),5))
if idCategory>119 AND idCategory<125 then
.... [action to be taken] .....


Edited by worldofrugs - 19-August-2010 at 2:58pm
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.