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 Quote Link to comment 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 Quote Link to comment 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??? Quote Link to comment Share on other sites More sharing options...
Devon11 Posted January 16, 2009 Share Posted January 16, 2009 isset — Determine whether a variable is set Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.