Home > ASP Development > Passing session variables

Passing session variables



I'm trying to use session variables to maintain site security and thus use these variables to make comparisons to different fields, one of which is to compare a set access level to the access level assigned to the user. to do this im making a string comparison, and to make sure the varialbes are coming up the same im writing them out as well. both are coming up on screen exactly the same but the comparison keeps producing a -1 ie not the same. i define one variable on the page and the other is the session variable, so im assuming its the latter that is causing the problem. does anyone know what would cause this and how i can fix it? ive tried using the trim function just in case it was picking up whitespace but to no avail.

    
Guest


it m aybe due to a case issue as asp doesnt see Apple the same as apple, so wrap Lcase(var) around your variables then give that a shot.

Was this answer helpful ? Yes No   
Guest


dont think its that, as i said to make sure im not missing anything i have a response.write(variablename) x2 an they are both exactly the same, thats why cant figure it out.

Was this answer helpful ? Yes No   
Guest


figure it out, in my database the field size was defined as 10 (the default) which seemed to add on extra characters to the field even though i used the trim function.didn't know that this happened.thank god that was pissing me off seein two variables come up exactly the same an still tell me they were different.

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved