Jump to content

Acoounts Logins and sessions?


thyphen

Recommended Posts

Ok so i have been working with php for a while now I'm not an advanced user at all but I want to start getting into some more practical things like creating accounts having them log in and once there logged in be able to visit certain areas and do certain things. You know something like Myspace (I'm not looking to make my own myspace clone because I'm sure that would take LOTS of coding) I basically want want a site where people can log and be able to see certain parts of the site and add information only once there logged in. So  I am wondering if anyone knows a good site/tutorial on logins and accounts and what not where I can get started...

Link to comment
https://forums.phpfreaks.com/topic/39331-acoounts-logins-and-sessions/
Share on other sites

This is a good page  to start http://uk2.php.net/function.session-start

 

Try doing something like:

 

print_r( $_SESSION );
session_start();
print_r( $_SESSION );

echo session_id();

$_SESSION['my_var'] = 'hello';

 

Then try reloading the page.

 

Also check out your cookies in Firefox.

 

PHP stores the $_SESSION array in a file on the server. It sends the users the session ID in a cookie. Then when you do session_start() it uses the session ID (from cookie, or $_GET) to load the file and read the saved array into $_SESSION.

 

monk.e.boy

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.