Reload a PHP session?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Reload a PHP session?

Post by sn4k3 »

is possible reload a php session?

i want to refresh all session data every page load

this is for use with all logged persons

is possible?
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Anything stored in $_SESSION from previous pageloads is reinitialized when you call session_start()
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

aaronhall wrote:Anything stored in $_SESSION from previous pageloads is reinitialized when you call session_start()
for me no :(

exemple:

i log into a account
i have a Stat block eg. 20 menbers stat
i go manualy to mysql and change to 21

when i make a reload in my page this not update stay showing 20

after when i logout and login again will be correct

any about this?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Likely a cache problem.
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

superdezign wrote:Likely a cache problem.
how can i solve this?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Clear your cache.
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

Everah wrote:Clear your cache.
how?

sorry about this, this never happen before :oops:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Depending on the browser, usually Ctrl+F5 clears it.
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

Everah wrote:Depending on the browser, usually Ctrl+F5 clears it.
no work

page reload but dont refresh the stats still with olds
i need force all guys to do that at page load
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Time to look closer at the code then.
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

Everah wrote:Time to look closer at the code then.
im using Dreamweaver Developer Tool extension to make the login and all, before this work at page refresh but now dont work

Code: Select all

<?php require_once('Connections/CFmysql.php'); ?>
<?php
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");
?>
this is what i use to in each page to load sessions and check logins
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Unfortunately that little snippet will tell nobody anything. What is in the code that is included (that will have something to do with your problem)?
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Post by sn4k3 »

Everah wrote:Unfortunately that little snippet will tell nobody anything. What is in the code that is included (that will have something to do with your problem)?
i search in includes and i found a good tool

Code: Select all

/** 
 * Update in session the values related to user login;
 * @param object tNG transaction object
 * @return nothing
 * @access public
 */
function Trigger_Update_RefreshSession(&$tNG) {
i go try that
Post Reply