note 14551 added to function.session-unregister.php

From: Date: Fri, 03 Aug 2001 14:00:00 +0000
Subject: note 14551 added to function.session-unregister.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16283@lists.php.net to get a copy of this message
<p>you __CANNOT__ change a value stored in a session variable via a GET variable with the same name.</p> example: html query: get index.php?cat=yellow session data: cat='red' <p>you cannot change the value of 'cat' because session_register before register the new value checks if that values comes from HTTP_VARS array. if so, it silenly ignores your change. the only way is to do something like: html query: get index.php?fake_cat=yellow and in the index.php ----index.php---- session_unregister('cat'); $cat=$fake_cat; session_register('cat'); hope that helps. http://www.php.net/manual/en/function.session-unregister.php

« previous php.notes (#16283) next »