Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 16 to 17 of 17
Thread: Anything wrong with my OOP?
11-23-2012, 07:44 AM #16
- Join Date
- Jan 2010
- Behind the Wall
- Thanked 472 Times in 467 Posts
that has nothing much to do with the login script (which is intended to provide the form for logging in!). what you need to do to continue a session is checking if the session says that the user is already logged in.The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.André Behrens, NY Times Software Developer
11-23-2012, 04:56 PM #17
- Join Date
- Sep 2010
- Thanked 6 Times in 6 Posts
Ok, then I was on the right track. Working now, but maybe I should have explained the problem a little more in depth. What I meant was I assumed the problem was that I had that line in the wrong... section (for lack of a better word). Which I did, after playing with the code some more, I found/realized that because of where it was, my code only checked to see if the user was logged in (if ($_SESSION['loggedin'] == 1)) after the form was submitted.
But thanks, hopefully I can use this as a reference for when I start adding to my classes.Coding is a challenge, get used to it
Always remember to debug
Try the guess & check method
Break it down into simple steps