Session id being inserted in the wrong place

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jn

    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?sSQLPr eBuiltWhere=L.P ROPERTY_STATE_I D%20=%20'FL'%
    20AND%20L.NODIS PLAY_IDX%20IS%2 0NULL%20%20AND% 20L.NODISPLAY_O WNER%20IS%20NUL L
    %20%20AND%20L.V OW_ENABLED_LIST _FIRM_ONLY%20IS %20NULL%20%20AN D%20L.STATUS_CO D
    E%20=%20'A'%20A ND%20L.IDX_ENAB LED%20IS%20NOT% 20NULL%20%20AND %20%20L.MLS_ID% 2
    0IN%20('midfl', 'newsmyrna','ta mpa','daytona') %20AND%20L.CITY _ID%20IN%20('Y2 1
    688')%20AND%20L .PROPERTY_TYPE_ CODE%20=%20'S'% 20AND%20L.SALE_ PRICE%20&sessid =
    4bc1f9c2fcbc2f7 8503cfddf93bc8d 5f>=%200%20AND% 20L.SALE_PRICE% 20<=%2099999999 9
    99

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

    What is going on here?


  • Pedro Graca

    #2
    Re: Session id being inserted in the wrong place

    jn wrote:[color=blue]
    > Here is what I'm talking about:[/color]
    [color=blue]
    > http://mysite.com/page.php?sSQLPr eBuiltWhere=L.P ROPERTY_STATE_I D%20=%20'FL'%
    > 20AND%20L.NODIS PLAY_IDX%20IS%2 0NULL%20%20AND% 20L.NODISPLAY_O WNER%20IS%20NUL L
    > %20%20AND%20L.V OW_ENABLED_LIST _FIRM_ONLY%20IS %20NULL%20%20AN D%20L.STATUS_CO D
    > E%20=%20'A'%20A ND%20L.IDX_ENAB LED%20IS%20NOT% 20NULL%20%20AND %20%20L.MLS_ID% 2
    > 0IN%20('midfl', 'newsmyrna','ta mpa','daytona') %20AND%20L.CITY _ID%20IN%20('Y2 1
    > 688')%20AND%20L .PROPERTY_TYPE_ CODE%20=%20'S'% 20AND%20L.SALE_ PRICE%20&sessid =
    > 4bc1f9c2fcbc2f7 8503cfddf93bc8d 5f>=%200%20AND% 20L.SALE_PRICE% 20<=%2099999999 9
    > 99[/color]
    [color=blue]
    > You can see the sessid variable (toward the end) right in the middle of the
    > sSQLPreBuiltWhe re variable. I can't turn off transid...the entire site
    > relies on it.[/color]
    [color=blue]
    > What is going on here?[/color]

    No idea!

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

    I'd do something like

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

    echo '<a href="http://mysite.com/page.php?sSQLPr eBuiltWhere=';
    echo url_encode(str_ replace('&', '&amp;', $query));
    echo '">link</a>';
    ?>
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    • jn

      #3
      Re: Session id being inserted in the wrong place

      "Pedro Graca" <hexkid@hotpop. com> wrote in message
      news:btfjbg$6pg ub$3@ID-203069.news.uni-berlin.de...[color=blue]
      > jn wrote:[color=green]
      > > Here is what I'm talking about:[/color]
      >[color=green]
      > >[/color][/color]
      http://mysite.com/page.php?sSQLPr eBuiltWhere=L.P ROPERTY_STATE_I D%20=%20'FL'%[color=blue][color=green]
      > >[/color][/color]
      20AND%20L.NODIS PLAY_IDX%20IS%2 0NULL%20%20AND% 20L.NODISPLAY_O WNER%20IS%20NUL L[color=blue][color=green]
      > >[/color][/color]
      %20%20AND%20L.V OW_ENABLED_LIST _FIRM_ONLY%20IS %20NULL%20%20AN D%20L.STATUS_CO D[color=blue][color=green]
      > >[/color][/color]
      E%20=%20'A'%20A ND%20L.IDX_ENAB LED%20IS%20NOT% 20NULL%20%20AND %20%20L.MLS_ID% 2[color=blue][color=green]
      > >[/color][/color]
      0IN%20('midfl', 'newsmyrna','ta mpa','daytona') %20AND%20L.CITY _ID%20IN%20('Y2 1[color=blue][color=green]
      > >[/color][/color]
      688')%20AND%20L .PROPERTY_TYPE_ CODE%20=%20'S'% 20AND%20L.SALE_ PRICE%20&sessid =[color=blue][color=green]
      > >[/color][/color]
      4bc1f9c2fcbc2f7 8503cfddf93bc8d 5f>=%200%20AND% 20L.SALE_PRICE% 20<=%2099999999 9[color=blue][color=green]
      > > 99[/color]
      >[color=green]
      > > You can see the sessid variable (toward the end) right in the middle of[/color][/color]
      the[color=blue][color=green]
      > > sSQLPreBuiltWhe re variable. I can't turn off transid...the entire site
      > > relies on it.[/color]
      >[color=green]
      > > What is going on here?[/color]
      >
      > No idea!
      >
      > ... but, how are you building that link?
      >
      > I'd do something like
      >
      > <?php
      > $query='L.PROPE RTY_STATE_ID = \'FL\' AND ' /* ... */ . '<= 99999999999';
      >
      > echo '<a href="http://mysite.com/page.php?sSQLPr eBuiltWhere=';
      > echo url_encode(str_ replace('&', '&amp;', $query));
      > echo '">link</a>';
      > ?>
      > --
      > --= my mail box only accepts =--
      > --= Content-Type: text/plain =--
      > --= Size below 10001 bytes =--
      >[/color]

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


      Comment

      Working...