Saturday 14 March 2009

Social network #4

I have now achieved a working login and changed the coding of the SQL statement so the ‘WHERE’ is related to the login id of the user. Initially I had the login on the profile page with a link from the home page and had the PHP underneath the login to show the profile however when trying to add sessions this caused problems and the user wasn’t being recognised when returning from visiting other pages within the site.

I therefore decided to have the login on the homepage and then a menu link to the profile to over come this problem as others had achieved successful sessions by doing it this way. Once I had then added the session coding to all the pages when the member moved within the site their session was remembered. The only problem I now have is that I wanted the ‘log out’ button to both log out and return to the homepage, unsure on how to achieve this I overcome this problem by having the logout button within the profile page return to the homepage where you then have to click the ‘log out’ button to fully log out of the session.

No comments: