Reply to Re: Redirect while carying form data

Your name:

Reply:


Posted by bill on 12/11/06 15:17

no@emails.thx wrote:
> 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.

It does, thank you very much, great advice - next question is how
do I access the record number in mySQL ?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация