Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    May 2003
    Location
    Las Vegas
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape Passing Variables in the URL

    OK... I'm lost & confused now. I am trying to pass simple values in the URL from page to page. Of course it works fine in IE with just:
    ?a=something&b=another
    BUT Netscape can't pick up the second value. It does get the first. I notice that here at coding forums the IE string comes through as plain text but when I use NS it is encoded.

    None of my reference books explain the encoding thing. Can someone point me to a good explination of making the link as well as decoding it.

    I am trying to pass the information back to the same page to do a database query and display dynaminc content.

    Thanks
    Larry

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    PHP is not clientside, so using a different browser will not affect your coding.

    I notice that here at coding forums the IE string comes through as plain text but when I use NS it is encoded.
    There's nothing encoded in the urls

    Show your code and we'll help from there, but it's nothing to do with browser

  • #3
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Hmm, well maybe it might be.

    IE seems to handle spaces in the URL quite well.

    example

    www.mysite.com/page.php?var1=hello world&var2=foo

    The space in "hello world" is often handled in IE, but I have noticed that NN and a few others consider a space to be the end of the URL and do not include anything after that.

    I'm sure this is true for other characters as well.

    Try to use urlencode before setting a variable. Than should replace all your spaces with %20 which should be ok for ALL browsers.

    Alternatively, you could use rawurlencode. Both are in the php documentation.

  • #4
    New to the CF scene
    Join Date
    May 2003
    Location
    Las Vegas
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks NightFire.

    I got it working. I had stray <div> getting called that was covering the output.


    Larry
    Last edited by VegasLarry; 10-01-2003 at 04:34 PM.

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    The s=dsfgsdfgsdfwew in the URL is just the session being passed over. If your browser accepts session cookies, then you won't see the s=gdfgdsgsdfds

  • #6
    New to the CF scene
    Join Date
    May 2003
    Location
    Las Vegas
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cool.... I was just trying to paste the URL and everytime it would get parsed without the session ID...

    Thanks Again
    Larry


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •