Re: session_start();

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <1331042118.5571.YahooMailNeo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Roger Head <headrog@xxxxxxxxx> writes
>Do anyone have a quick and easy way to create sessions?
>So a user has to log into a selection of a site.

I *think* that you mean, that a session variable has to exist before a
user can visit a part of the site. Is that it?

If so, ask for username and password, look it up in the database. If the
result returns just one record, set the session as the user ID.

At the beginning of each page in that section, check if there is a
session variable carrying the user ID. If not, forward the visitor to
the log in page.



-- 
Pete Clark

Local sites for Local People in Spain
http://localFaces.net

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux