[phplib] add_query - bug? From: mailling <email protected>
Date: 07/19/00

Hi,

Let's say you go to index.php?d=4
add_query will add & instead of ? if we want to specify an URL

$urltojump=$user->url($PHP_SELF).$user->add_query(array("id_application"=>'K'));

To solve this problem, I realize some check and replace '&' into '?'

It works for me

        $a=strpos($urltojump,'?');
        $b=strpos($urltojump,'&');
        if ( (!$a) || (($a>$b) && ($b)) )
                $urltojump=substr_replace($urltojump,'?',$b,1);

Stephane

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