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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
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('&', '&', $query)); echo '">link</a>'; ?> -- --= my mail box only accepts =-- --= Content-Type: text/plain =-- --= Size below 10001 bytes =-- |
|
|||
|
"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('&', '&', $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! |