Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

corillo181

if()help

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]<?php
session_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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.