Session id being inserted in the wrong place

This is a discussion on Session id being inserted in the wrong place within the PHP Language forums, part of the PHP Programming Forums category; I have a link that must have a GET variable with spaces in it. PHP keeps inserting the session id ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-2004
jn
 
Posts: n/a
Default Session id being inserted in the wrong place

I have a link that must have a GET variable with spaces in it. PHP keeps
inserting the session id right in the middle of my links. I've tried
replacing all spaces with %20...it still sticks it in the middle.

I didn't write this by the way...the links are coming from another site and
my server is inserting the session id into it.

Here is what I'm talking about:

http://mysite.com/page.php?sSQLPreBu...0'FL'%
20AND%20L.NODISPLAY_IDX%20IS%20NULL%20%20AND%20L.N ODISPLAY_OWNER%20IS%20NULL
%20%20AND%20L.VOW_ENABLED_LIST_FIRM_ONLY%20IS%20NU LL%20%20AND%20L.STATUS_COD
E%20=%20'A'%20AND%20L.IDX_ENABLED%20IS%20NOT%20NUL L%20%20AND%20%20L.MLS_ID%2
0IN%20('midfl','newsmyrna','tampa','daytona')%20AN D%20L.CITY_ID%20IN%20('Y21
688')%20AND%20L.PROPERTY_TYPE_CODE%20=%20'S'%20AND %20L.SALE_PRICE%20&sessid=
4bc1f9c2fcbc2f78503cfddf93bc8d5f>=%200%20AND%20L.S ALE_PRICE%20<=%20999999999
99

You can see the sessid variable (toward the end) right in the middle of the
sSQLPreBuiltWhere variable. I can't turn off transid...the entire site
relies on it.

What is going on here?


Reply With Quote
  #2 (permalink)  
Old 01-07-2004
Pedro Graca
 
Posts: n/a
Default Re: Session id being inserted in the wrong place

jn wrote:
> Here is what I'm talking about:


> http://mysite.com/page.php?sSQLPreBu...0'FL'%
> 20AND%20L.NODISPLAY_IDX%20IS%20NULL%20%20AND%20L.N ODISPLAY_OWNER%20IS%20NULL
> %20%20AND%20L.VOW_ENABLED_LIST_FIRM_ONLY%20IS%20NU LL%20%20AND%20L.STATUS_COD
> E%20=%20'A'%20AND%20L.IDX_ENABLED%20IS%20NOT%20NUL L%20%20AND%20%20L.MLS_ID%2
> 0IN%20('midfl','newsmyrna','tampa','daytona')%20AN D%20L.CITY_ID%20IN%20('Y21
> 688')%20AND%20L.PROPERTY_TYPE_CODE%20=%20'S'%20AND %20L.SALE_PRICE%20&sessid=
> 4bc1f9c2fcbc2f78503cfddf93bc8d5f>=%200%20AND%20L.S ALE_PRICE%20<=%20999999999
> 99


> You can see the sessid variable (toward the end) right in the middle of the
> sSQLPreBuiltWhere variable. I can't turn off transid...the entire site
> relies on it.


> What is going on here?


No idea!

.... but, how are you building that link?

I'd do something like

<?php
$query='L.PROPERTY_STATE_ID = \'FL\' AND ' /* ... */ . '<= 99999999999';

echo '<a href="http://mysite.com/page.php?sSQLPreBuiltWhere=';
echo url_encode(str_replace('&', '&amp;', $query));
echo '">link</a>';
?>
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Reply With Quote
  #3 (permalink)  
Old 01-07-2004
jn
 
Posts: n/a
Default Re: Session id being inserted in the wrong place

"Pedro Graca" <hexkid@hotpop.com> wrote in message
news:btfjbg$6pgub$3@ID-203069.news.uni-berlin.de...
> jn wrote:
> > Here is what I'm talking about:

>
> >

http://mysite.com/page.php?sSQLPreBu...0'FL'%
> >

20AND%20L.NODISPLAY_IDX%20IS%20NULL%20%20AND%20L.N ODISPLAY_OWNER%20IS%20NULL
> >

%20%20AND%20L.VOW_ENABLED_LIST_FIRM_ONLY%20IS%20NU LL%20%20AND%20L.STATUS_COD
> >

E%20=%20'A'%20AND%20L.IDX_ENABLED%20IS%20NOT%20NUL L%20%20AND%20%20L.MLS_ID%2
> >

0IN%20('midfl','newsmyrna','tampa','daytona')%20AN D%20L.CITY_ID%20IN%20('Y21
> >

688')%20AND%20L.PROPERTY_TYPE_CODE%20=%20'S'%20AND %20L.SALE_PRICE%20&sessid=
> >

4bc1f9c2fcbc2f78503cfddf93bc8d5f>=%200%20AND%20L.S ALE_PRICE%20<=%20999999999
> > 99

>
> > You can see the sessid variable (toward the end) right in the middle of

the
> > sSQLPreBuiltWhere variable. I can't turn off transid...the entire site
> > relies on it.

>
> > What is going on here?

>
> No idea!
>
> ... but, how are you building that link?
>
> I'd do something like
>
> <?php
> $query='L.PROPERTY_STATE_ID = \'FL\' AND ' /* ... */ . '<= 99999999999';
>
> echo '<a href="http://mysite.com/page.php?sSQLPreBuiltWhere=';
> echo url_encode(str_replace('&', '&amp;', $query));
> echo '">link</a>';
> ?>
> --
> --= my mail box only accepts =--
> --= Content-Type: text/plain =--
> --= Size below 10001 bytes =--
>


I just did something similar to that and it worked. I had to use
rawurlencode instead. Thanks for the reply!


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:15 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0