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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Session ID on first link

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
A strange subject that, but here's the thing.
All pages on my site include a page. On this page, it says:
Code:
session_start();

if (!$PHPSESSID) {
	session_register('logged_in');
} else if (!$logged_in) {
	session_register('logged_in');
}
Now that is perfectly fine and all is well site-wise. However - the first link you hover over on the page, all of them, displays the link followed by :

?PHPSESSID=blablabla

Now - is there anyway round this? _________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
*takes a look* Yeah nothing there I didn't know really. Though I do note that on one page it says:

"Note: Non-relative URLs are assumed to point to external sites and hence don't append the SID, as it would be a security risk to leak the SID to a different server."

At the moment I can't see anyway round my problem cept to try this and see what happens. I mean - it's ONLY sent on the FIRST page, so I fail to see why it needs be sent once but not again. I don't want to FORCE people to use cookies, incase they, as many do, have cookies banned or filtered or controlled. But what I'd like is to not change anything to do with how it works, but simply stop it sending the PHPSESSID with the first link. If, for some reason, the way PHP's sessions work require the phpsessid to be sent once to the server, I will just have to coverup all my links simply to stop the link looking ugly with a sessid on it.

Perhaps my understanding of sessions is a bit limited - I thought they were randomly generated 'keys' as it were to name a user and store info about them that timeout on their own. Inwhichcase they'll be different everytime. 4:30am is too late to think about this *sleeps* _________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top