fallenangel1983 Posted March 15, 2008 Share Posted March 15, 2008 I get the error = rse error: syntax error, unexpected '{' in C:\ blah blah blah .php on line 18 the line 18 is: $pass == ({$_SESSION['password']}); now i know its probalby because of the '{' but i dont know how to set it? checked the usual tutorials but i dont really understand it. I know its trivial but any help would be appreciated, cheers. Link to comment https://forums.phpfreaks.com/topic/96326-accessing-a-session-variable/ Share on other sites More sharing options...
peranha Posted March 15, 2008 Share Posted March 15, 2008 $pass = $_SESSION['password']; that is how you set $pass from the session. Link to comment https://forums.phpfreaks.com/topic/96326-accessing-a-session-variable/#findComment-493074 Share on other sites More sharing options...
fallenangel1983 Posted March 15, 2008 Author Share Posted March 15, 2008 That worked so far thankyou very much but how is it that you set the new password to the session password? what i need to do in detail is change the password but set the new password that they have chosen to the new session password because as of now the password is changing but not the session password until the user logs out. this causes a problem if the user wishes to change the password again before logging out. Link to comment https://forums.phpfreaks.com/topic/96326-accessing-a-session-variable/#findComment-493076 Share on other sites More sharing options...
peranha Posted March 15, 2008 Share Posted March 15, 2008 Then just do it the other way $_SESSION['password'] = $pass; Link to comment https://forums.phpfreaks.com/topic/96326-accessing-a-session-variable/#findComment-493081 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.