dadamssg Posted January 16, 2009 Share Posted January 16, 2009 my users will be able to login and perform certain things such as enter in information through forms, but i want to either carry their username through the URL or store it in a session somehow so when i go to display what the user entered in the form i can display the username next to the result. whats the best way to carry this small piece of data? thanks Link to comment https://forums.phpfreaks.com/topic/141109-best-way-to-carry-username-info/ Share on other sites More sharing options...
Devon11 Posted January 16, 2009 Share Posted January 16, 2009 at the loggin page (after you check the user and pass) $_SESSION['username'] = $_POST['username'] ; and at the main page if (!isset($_SESSION)) { session_start(); } echo $_SESSION['username']; it may be a variant Link to comment https://forums.phpfreaks.com/topic/141109-best-way-to-carry-username-info/#findComment-738562 Share on other sites More sharing options...
dadamssg Posted January 16, 2009 Author Share Posted January 16, 2009 thanks, what exactly does the isset function do...i think it checks to see if the variable is set...but i don't know what it does if it finds a set function or an empty one??? Link to comment https://forums.phpfreaks.com/topic/141109-best-way-to-carry-username-info/#findComment-738565 Share on other sites More sharing options...
Devon11 Posted January 16, 2009 Share Posted January 16, 2009 isset — Determine whether a variable is set Link to comment https://forums.phpfreaks.com/topic/141109-best-way-to-carry-username-info/#findComment-738568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.