301 Redirect |
Post Reply | Page <12 |
Author | |
worldofrugs
Senior Member Joined: 24-April-2008 Location: United States Status: Offline Points: 0 |
Post Options
Thanks(0)
|
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!!! |
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
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 |
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(0)
|
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.
|
|
worldofrugs
Senior Member Joined: 24-April-2008 Location: United States Status: Offline Points: 0 |
Post Options
Thanks(0)
|
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 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 |
|
Post Reply | Page <12 |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |