RE: [PHP] How do I use sessions if cookies are turned off in the browser?

From: Date: Fri, 20 Aug 2004 13:39:01 +0000
Subject: RE: [PHP] How do I use sessions if cookies are turned off in the browser?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194327@lists.php.net to get a copy of this message
OK! I got it to work. Although session_id() would not work, using the SID constant did. Below is the code I used: ===== Start of Code ===== <?php session_start(); header("Cache-control: private"); //IE 6 Fix if(!$_SESSION['count']){ $_SESSION['count'] = 1; echo '<p>First time through</p>'; } else { $_SESSION['count']++; } ?> <p>You have visited <? echo $_SESSION['count']; ?> pages so far!</p> <A HREF="test.php?<?php echo SID?>">Increment Your Counter!</A>====== End of Code ======

« previous php.general (#194327) next »