Discussion: PHPSESSID in links
Afficher un message
Vieux 17/09/2007, 21h26   #1
Kevin Murphy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHPSESSID in links

I've got a site (password protected, sorry) where I have this in the
top of my template:

session_start();
$iSessionId = session_id();
$iSessionName = session_name();

Then I have a bunch of links like this in the site:

echo "<a href=\"/departments/\">Departments</a>";

The first time, and only the first time you load the page, that link
is transformed in the HTML output to be this:

<a href="/departments/?
PHPSESSID=4aec641b497131493b1c4bf489def723">Depart ments</a>

But if I reload the page, or go to any other page, I will get this:

<a href="/departments/">Departments</a>

which is what I want. Obviously I could do something where if it
detects the PHPSESSID in the URL, it forces the page to reload, but I
was thinking that there would be another way to do this without
adding another page load into the mix. Is there?

--
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada College
www.wnc.edu
775-445-3326

P.S. Please note that my e-mail and website address have changed from
wncc.edu to wnc.edu.
  Réponse avec citation
 
Page generated in 0,04358 seconds with 9 queries