corillo181 Posted June 11, 2006 Author Share Posted June 11, 2006 so you saying A SESSION UPDATES AUTOMATICLY?when you got a site and something is passed by session dont you need to refresh that person session?becuase it only seen to wokr when the session is destroy and is stared again.. and i seen logicly, becuase if the session is already going is going to have the same value that is passed on when a user log in :S..is there any way i can send the user back to the usercheck to give them the newly update session info and then take them back to the page that they came from? Quote Link to comment https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44379 Share on other sites More sharing options...
wildteen88 Posted June 12, 2006 Share Posted June 12, 2006 What do you mean by restart that person session? You can change a persons session anywhere in your script such as you can do this:[code]<?phpsession_start();$_SESSION['lvl'] = "Something";//some other code here$_SESSION['lvl'] = "hello world";?>[/code]When you run that code first PHP will set the lvl session to 'Something' then further down PHP will rewrite the lvl session to 'hello world'. You dont need to destorythee session and then reset the session if you are chaning something in the session! You only do that when you are using cookies. Quote Link to comment https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44548 Share on other sites More sharing options...
corillo181 Posted June 12, 2006 Author Share Posted June 12, 2006 them something must be wrong with my session because it only works if the session is destroy and restared.. the levle does change but only take effect after a new session is stared.. Quote Link to comment https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44623 Share on other sites More sharing options...
wildteen88 Posted June 12, 2006 Share Posted June 12, 2006 When using sessions you do have [b]session_start();[/b] as the first line of code in every page that uses sessions dont you? Otherwise it seems that your sessions are not being handled correctly! Quote Link to comment https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44676 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.