|
Posted by Rik on 01/12/07 08:41
Jeff wrote:
> Hey
>
> php 5.2.0
>
> I'm developing a web site by using php. Registered users of the web
> site can login to get access to member area. All the pages in the web
> site contains a DIV which shows the name of the logged in person. The
> PROBLEM is that after a person has logged in the name of the user
> isn't displayed. But it comes visible if the user clicks on one pages
> in the web site...
>
> This is as described in the php manual:
> "Cookies will not become visible until the next loading of a page
> that the cookie should be visible for."
>
> I'm thinking of creating a dummy page which does nothing but redirect
> the user to the correct page. Hope maybe this can solve the problem
> mention above... , I'm not sure this is a good approach... maybe you
> have a better approach, then please share it with me.. Because I'm
> stucked in this error
>
> Best Regards
Well, if the users are logged in they already had a pagechange at login.
It sounds to me the logic to determin wether a user has logged in is done
late in the page, while it should be one of the first to be checked. If the
'login'(check) part of the script is before the logic to display the
username all should be well.
--
Rik Wasmus
Navigation:
[Reply to this message]
|