Sessions seems to be the popular way to go. It's stored at the server, so
you don't have to worry about any clients disabling cookie support.
--
William Fong - [EMAIL PROTECTED]
Phone: 626.968.6424 x210 | Fax: 626.968.6877
Wireless #: 805.490.7732| Wireless E-mail: [EMAIL PROTECTED]
- Original Message -
From: Martin Towell [EMAIL PROTECTED]
To: 'WG4- Cook, Janet' [EMAIL PROTECTED]; PHP db list
[EMAIL PROTECTED]; PHP List [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 4:06 PM
Subject: [PHP-DB] RE: [PHP] Help needed - need to access a value from DB
into all pages
: I can think of three ways you could do this.
:
: 1. as a cookie
: 2. using sessions
: 3. put it in every link
:
: Martin
:
: -Original Message-
: From: WG4- Cook, Janet [mailto:[EMAIL PROTECTED]]
: Sent: Friday, February 22, 2002 10:59 AM
: To: PHP db list; PHP List
: Subject: [PHP] Help needed - need to access a value from DB into all
: pages
:
:
: Hi there,
:
: I am struggling with a concept and can't seem to find a way to do it so
: hoping you all can help.
:
: We want to use PHP with MySql Db.
: For security reasons on the DB, it is to be accessed only through this
front
: end i.e. via the internal web
: Each user will have a number of levels of access to various parts of the
: system, so the obvious design is one where there is only 1 real login to
the
: MySQL db (i.e. the system will auto log everyone in as this without them
: knowing it), and then the user is validated against a table in my DB which
: holds the access rights. I can get through the login OK, and get my table
to
: return USERID for this person. Now I need that USERID available to ALL
: other pages so I can use it to determine what parts of screens to show,
and
: what to allow them to do.
:
: My question is how do I make this variable available to all pages?? Do I
: have to include it with the variables passed to each page or is there a
: simpler way of doing it. Can I put the variable in an include file and
: include it in every page - will that work?.
:
: Surely someone must have had a similar situation before and can tell me
how
: they solved it.
:
: Many thanks
:
: Janet
:
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php