Jump to content

if()help


corillo181

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?
Link to comment
https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44379
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.
Link to comment
https://forums.phpfreaks.com/topic/11655-ifhelp/page/2/#findComment-44548
Share on other sites

Archived

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

×
×
  • Create New...

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.