Re: ASP Cookies vs. ASP Session variables
by "Rasika Wijayaratne" <rasika(at)boursedata.com.au>
|
| Date: |
Thu, 9 Nov 2000 15:03:44 +1100 |
| To: |
<hwg-languages(at)hwg.org> |
| References: |
felix |
| |
todo: View
Thread,
Original
|
|
Hi Phil & others
>Every page then does lngClientID = Request.Querystring("id") and in the
case where lngClientID = "" then we check >the cookie and if it is still
null we get a new one from the database.
Are you referring to the Primary Key (auto number) in the "users" table, or
do you mean some kind of randomly asssigned number?
My curent project has scripts that are accessed by admin users and normal
users. So I have a session variable that detrmin if a certain block of html
gets rendered or not, depending on who is viewing the page:-
if Session(bolIsAdmin) = True Then
Response.Write <block of HTML>
end if
How would you handle this sort of siutation without using Session variables?
You wouldn't want to pass this sort of info via querystring as a non-admin
user could feed in values using the broswer address bar, and access things
they should not. By using cookies perhaps? I suppose you could open up the
"users" table on each script, and check if the current user has admin
status, but that would be a bit of a hassle...
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.