Date: 11/29/99
- Next message: Samuel Liddicott: "RE: [PHPLIB] Warning - Same session in two browsers?"
- Previous message: lanyzz <email protected>: "[PHPLIB] THIS WEEKEND"
- In reply to: Joel: "Re: [PHPLIB] $sess->url and $sess->add_query()"
- Next in thread: THE MASTER: "Re: [PHPLIB] $sess->url and $sess->add_query()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hi
i've never used add_query, i think fo the same reason. however, try it
like this:
$url = "index.php3?id=10";
or
$url = "index.php3?page=1;
and now:
<a href="<?$sess->purl($url)?>">TESTURL</a>
doing it this way it'll always work, cookie or get. in get, purl appends
the session variable.
enjoy the week
-florian
On Mon, 29 Nov 1999, Joel wrote:
> Dear Shawn,
>
> Thanks for your kind help. However, the add_query() is actually my typo ^_^ (sorry for this).
> Actually, I have tried both
> <a href="<?$sess->purl("details.php3").$sess->padd_query(array("id"=>"10","page"=>"1"))?>">TESTURL</a>
> &
> <a href="<?echo $sess->url("details.php3").$sess->add_query(array("id"=>10,"page"=>"1"))?>"TESTURL</a>
> but still get the error. Any idea? There isn't any problem when it is in get mode or the current url is
> not passed with get variables.
> eg, URL:http://www.abc.com/index.php3
> got no problem, but if the current url like this
> eg, URL:http://www.abc.com/index.php3?id=10
> then all hyperlinks in this index.php3 will become incorrect
> eg, next page = http://www.abc.com/details.php3&page=1
> it is the '&' sign causing the problem. I don't know why it can't passed with '?' in this case.
> Absolutely, there isn't any problem if it is in fallback mode. I am now really in trouble.
>
> Yours regard,
> Joel
>
> Shawn Patton wrote:
>
> > Joel,
> >
> > Try quoting your string argument passed to purl("path/file") and
> > use padd_query() instead of add_query(). So in your example you would
> > have:
> >
> > <a href="<?$sess->purl("details.php3?page=1").$sess->padd_query(array("id"=>"10"))?>">TEST URL</a>
> >
> > or, instead of passing the var => val pair in the purl() arg, try passing them in the padd_query(),
> > like:
> >
> > <a href="<?$sess->purl("details.php3").$sess->padd_query(array("id"=>"10","page"=>1))?>">TESTURL</a>
> >
> > or pass the $array name to padd_query:
> >
> > $myarray["id"] = 10;
> > $myarray["page"] = 1;
> >
> > <a href="<?$sess->purl("details.php3").$sess->padd_query($myarray))?>">TESTURL</a>
> >
> > -Shawn
> >
> > Joel wrote:
> >
> > > Dear all,
> > >
> > > I have found a strange problem about the $sess->url(). My code like
> > > this,
> > > <a
> > > href="<?$sess->purl(/test/test.php3).$sess->add_query(array("id"=>"10"))?>">
> > >
> > > TEST URL</a>
> > > When the current url is clear (ie, no parameter passed with get
> > > method, eg. /index.php3), there is no problem at all. However, when the
> > > current url like this, /details.php3?page=1, then all url in this page
> > > will not get the "?". For example, next page hyper link will appear as
> > > something like this, /details.php3&page=2. It therefore gives me an
> > > error: file not found. Please help. Thanks in advance
> > >
> > > Yours regard,
> > > Joel
> > >
> > > -
> > > PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> > > To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> > > the body, not the subject, of your message.
> >
> > -
> > PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> > To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> > the body, not the subject, of your message.
>
> -
> PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> the body, not the subject, of your message.
>
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Samuel Liddicott: "RE: [PHPLIB] Warning - Same session in two browsers?"
- Previous message: lanyzz <email protected>: "[PHPLIB] THIS WEEKEND"
- In reply to: Joel: "Re: [PHPLIB] $sess->url and $sess->add_query()"
- Next in thread: THE MASTER: "Re: [PHPLIB] $sess->url and $sess->add_query()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

