Touble setting session variables

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
wbryan6
Forum Newbie
Posts: 22
Joined: Sat Feb 04, 2006 12:13 pm

Touble setting session variables

Post by wbryan6 »

I am trying to develop a secure login and I'm having an issue setting session variables. Currently, all I want to start with is a welcome page (Welcome "user" you have successfully been logged in) but after a series of attempts I have yet to have the username assigned to a session variable. My setup has a login page which transfers information to an authentication page via a form. The authentication page then redirects a successful login to the welcome page and an unsucessful login to an error page. I have used the session_regiser(var) function and then called the function as $var, $_SESSION, $HTTP_SESSION_VARS, and all with no avail. Any input would be greatly appreciated. Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Are you sure the session starts? If you have sessions create a cookie, is the cookie being created?

It may be good to post your code.
Post Reply