thyphen Posted February 20, 2007 Share Posted February 20, 2007 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 More sharing options...
skali Posted February 20, 2007 Share Posted February 20, 2007 http://www.tutorialized.com/tutorial/PHP-Simple-login-script/9963 and you can google and you'll find lot of helpful resources. Link to comment https://forums.phpfreaks.com/topic/39331-acoounts-logins-and-sessions/#findComment-189657 Share on other sites More sharing options...
monk.e.boy Posted February 20, 2007 Share Posted February 20, 2007 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 Link to comment https://forums.phpfreaks.com/topic/39331-acoounts-logins-and-sessions/#findComment-189662 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.