|
Posted by no on 12/11/06 14:07
On Mon, 11 Dec 2006 07:00:58 -0500, bill <nobody@spamcop.net> wrote:
>relative PHP newbie, not new to computing or web design
>
>Login page -> get data page (bringing user name and password in
>form variables).
>
>get data page -> display data page (bringing user name and
>password in hidden form variables).
>
>display data page -> approval page (bringing user name and
>password in hidden form variables. Also bringing disposition in
>a form variable.)
>
>the problem is: from the approval page I want to redirect to the
>get data page, but need to bring along the user name and password
>so it does not get redirected back to the login page.
>
>Is this were I would profitably use session variables ? I have
>not explored that solution. Is there a better and/or easier one
>other than bringing the user name and password in the URL ?
Hi Bill
Sessions are your best bet. Also, after approving the user's login and
password it would be better just to store a flag in the session - or
better-still the user's ID number from their record in the database.
Then you just have to check if the session variable exists and it
should imply that the user has logged in and is approved. :o)
Each PHP page should start with session_start() and then just refer to
the variable like $_SESSION['userid']
Hope that helps
Chris R.
Navigation:
[Reply to this message]
|