SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast vaiod's Avatar
    Join Date
    Jan 2001
    Location
    Chandler, Arizona
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I why doesn't Netscape pass text box data if it has a space in it.

    Ex:

    //Netscape
    Name: John Doe
    output = John
    //Explorer
    Name: John Doe
    output = John Doe

    Also how can I fix a problem with " in text input boxes
    Ex:

    Size of board: 14"
    output = 14\\\"

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Washington State
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regarding :

    output = 14\\\"

    Most likely you are doing both :

    1. Are using addslashes();
    2. Have magic_quotes_gpc setting turned ON.

    If magic quotes are on (see phpinfo() for your setting details) then don't use addslashes. And to view the data without slashes, use stripslashes() to strip them away.

    http://www.php.net/manual/en/configu...gic-quotes-gpc

    http://www.php.net/manual/en/function.stripslashes.php

    Regarding the ns vs. ie problem, have a more specific/real example?

  3. #3
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out this post..

    http://www.sitepointforums.com/showt...threadid=15810

    As for allowing " in a text string, I personally edit special characters out. I found I could not rely on the data being inserted into or selected from the table if I allowed special characters.

  4. #4
    SitePoint Enthusiast vaiod's Avatar
    Join Date
    Jan 2001
    Location
    Chandler, Arizona
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The URLENCODE(string) works but when I print the variable out on the screen for verification it puts the + sign.

    Is there a way to keep the John+Doe in the URL line but put John Doe on the screen for verification?

  5. #5
    SitePoint Enthusiast vaiod's Avatar
    Join Date
    Jan 2001
    Location
    Chandler, Arizona
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, I got it. Thanks all.

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Washington State
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, are you doing this ?

    <input name="foo" value=la la la>

    ? If so, use quotes like :

    <input name="foo" value="la la la">

    And regarding urlencode, use urldecode() to decode it. But in this case, you shouldn't have to use urlencode.


Bookmarks

Posting Permissions

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