[phplib] Problem with $sess->add_query From: Michael Freund (freund <email protected>)
Date: 05/24/00

Hi,

I found a Problem with $sess->add_query

e.g.

<A HREF="' . $sess->url("index.htm") . $sess->add_query (array ('Print' =>
'1')) . '">Druckformat</A>

In Cookie-Mode this (should) results to:

<A HREF="http://my.URL.de/index.htm?Print=1">Druckformat</A>

And it works fine unless the first time after Login.

Then I get:

<A HREF="http://my.URL.de/index.htm&Print=1">Druckformat</A>

(Hint: the difference is the "&" instead of "?")

This is, because $sess->add_query looks, if there is a $QUERY_STRING
different from "" to decide, which kind of $sep_char it will use.

     if ((isset($QUERY_STRING) && ("" != $QUERY_STRING))
      || ($this->mode == "get")) {
       $sep_char = "&";
     } else {
       $sep_char = "?";
     }

After the Login the $QUERY_STRING always holds the Session-ID for default
GET-Mode.

So, $sess->add_query takes the wrong "&" instead of the correct "?".

Now I am wondering, which influence has the last $QUERY_STRING for the next
$QUERY_STRING?

Normaly this is absolutely independent. It only depends on the (unknown)
string which is generated from $sess->url.

Any Ideas, how to solf this problem?

Regards

Michael

--

Haben Sie schon eine kostenloses Premium-Depot? http://www.finanzpartner.de/nos/depot.htm

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>