Re: Re[2]: [PHP] Supressing a session id in link

From: Date: Wed, 05 Mar 2003 14:38:17 +0000
Subject: Re: Re[2]: [PHP] Supressing a session id in link
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-138269@lists.php.net to get a copy of this message
"Tom Rogers" <trogers@kwikin.com> wrote in message news:16816663875.20030305145824@kwikin.com... > Hi, > > Wednesday, March 5, 2003, 1:47:39 PM, you wrote: > G> Tom Rogers wrote: > >> Hi, > >> > >> Wednesday, March 5, 2003, 12:45:27 PM, you wrote: > >> G> Hi All, > >> G> I need to suppress the session id in some links. The xhtml needs to > >> G> validate and the session id will no do so. A lot of people that visit > >> G> the site will try to validate the xhtml and css. > >> > >> G> I call the links with > >> G> <a href="<?php > >> G> echo$_SERVER['PHP_SELF'];?>?style=styles2">+1</a> > >> > >> G> and and the server generates > >> G> <a > >> G> href="/index.php?style=styles&PHPSESSID=5f88ef3510a086ca41adeec84a875ea4">+1 </a> > >> > >> G> W3's validator gives me this > >> > >> G> > >> G> http://validator.w3.org/check?uri=http%3A%2F%2Fnemesis1.f2o.org > >> > >> G> I have tried not starting the session until the link is clicked but then > >> G> the session does not carry over to the next page. Any Ideas? > >> > >> G> TIA > >> G> Gary > >> > >> It's the '&' that they are objecting to, change this line in your php.ini to the > >> following: > >> > >> arg_separator.output = "&amp;" > >> > > G> I don't have access to the .ini file. All I have access to is .htaccess. > > G> Gary > > ok in .htaccess you need this: > > php_value arg_separator.output "&amp;" An alternative is to the place the following in your script, preferably called at the beginning of every script: ini_set("arg_separator.output", "&amp;"); Steve

« previous php.general (#138269) next »