Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

&YourVisitID

Status
Not open for further replies.

jon159785

IS-IT--Management
Joined
Jul 8, 2003
Messages
15
Location
US
I am trying to use sessions with a basic hit counter to track if a user has hit a page or not.

I basically have:
Code:
session_name ('YourVisitID');
session_start(); // Start the session.

$mysession='news';
	$myupdate="UPDATE counter SET count=(count + 1) WHERE countid=4";
    mysql_query($myupdate); 
	session_register($mysession);

That works just fine... my problem is it makes all of my links within the page look like this:
/index.php?pg=news&YourVisitID=e35f0de42641be1f654ac4cc37201382

How can I make it not list &YourVisitID with all of that after it?

Thanks,

-Jon

 
Read in the PHP manual about the setting for transparent SID (session ids). It is turned on -in your case, and therefore all URLs have it. It is meant for non-cookie based sessions and is not a good idea.
 
put

ini_set('session.use_trans_sid', false);

Before

session_start(); // Start the session.

Works like a champ.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top