Need some help with PHP/MySQL

  • Thread starter Thread starter Wabsta
  • Start date Start date
  • Views Views 1,548
  • Replies Replies 4

Wabsta

you fight like a dairy farmer
Member
Joined
Apr 25, 2008
Messages
2,495
Solutions
5
Reaction score
74
Trophies
2
Age
34
Location
SCUMM Bar
Website
www.wabsta.com
XP
490
Country
Netherlands
Okay, I managed to make a login, and a register script (it's for a school project btw).
But, it has to check if someone really logged in.

I've read something about sessions, but I didn't really get it.

So, can someone explain these Sessions to me?
 
session is like temporary informations on the userside, which are deleted when the user close its explorer or tab window.


to read those data, you need to initialize (allow PHP to access) the sessions on each page you need it with a session_start()

CODE
 
Wow, thanks, that was better than all those tutorials on the interwebs.

Because I finally get it now.
So, thanks, I'll try it tommorow morning in class
smile.gif
 
Okay, I have this code now, but it doesn't work.
It's based on your idea Cyan.
Here it is:
CODE

It kinda works, as it makes me go to the site I inteded to go to (home.php, in home.php, there was a require "auth.php" which is this file), but if I go there again, it just gives me the login section again...
So probably, the session doesn't work.

Some information:
naam=name
wachtwoord=pass
verzonden=submit

These are some dutch words, that you may not figure out what it is
wink.gif


EDIT: I think it works now:
CODE

But how do I logout now?
I don't really get it..

EDIT 2:
NVM, figured it out.
 

Site & Scene News

Popular threads in this forum