note 8755 added to Session handling functions
| From: | mvonballmo at logicat dot com | Date: | Wed, 27 Sep 2000 03:48:01 +0000 |
| Subject: | note 8755 added to Session handling functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5472@lists.php.net to get a copy of this message | ||
chernyshevsky@hotmail.com has a great idea with the client-side javascript filling in the PHP SID. I
have two fixes:
Add this to the top of the addvar function to prevent appending to links that are javascript calls:
if (href.indexOf ("javascript") != -1) return href;
Add this loop to iterate the <a href ...> elements (anchors only iterates named anchors):
for (i = 0; i < document.links.length; i++)
{
with (document.links [i])
{
href = addvar (href, session_id);
}
}
http://www.php.net/manual/ref.session.php