1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

PHP Help

Discussion in 'BBS Hangout' started by Ace, Feb 9, 2006.

Tags:
  1. Ace

    Ace Contributing Member

    Joined:
    Feb 14, 1999
    Messages:
    1,691
    Likes Received:
    47
    I have a form. You enter text, and it is posted onto a website. However, for symbols such as & and £ I need to have the coded versions so that they display properly accross all browsers. Do you know how to do this?

    I have written a function which adds BR tags for line breaks and also used one which removed the problematic \ which are added before quote marks (so they don't show on the site). However, I just can't figure out how to do this bit so that all such characters come up as HTML!

    Any ideas?
     
  2. DrLudicrous

    DrLudicrous Contributing Member

    Joined:
    May 9, 2002
    Messages:
    3,936
    Likes Received:
    203
  3. Ace

    Ace Contributing Member

    Joined:
    Feb 14, 1999
    Messages:
    1,691
    Likes Received:
    47
    Yeah, it's something like that. Except when I use it, it actually ends up spitting out the same characters in the end. I have NO idea why it does this. I will try and look into it again. Thanks for the help.
     
  4. DrLudicrous

    DrLudicrous Contributing Member

    Joined:
    May 9, 2002
    Messages:
    3,936
    Likes Received:
    203
    So you want to update your custom function and use it instead of the built in function? If so post your code so I can look at it.
     
  5. SwoLy-D

    SwoLy-D Contributing Member

    Joined:
    Jul 20, 2001
    Messages:
    37,617
    Likes Received:
    1,448
    If you're passing the entity in a form, then the URLencode makes the characters parse out as regular characters. You may have to switch the code to NOT ACCEPT url-encoded characters. It's not really PHP, I don't think, I think it's the form that sends it that way through the browser. Best yet, post the part of the page that does that like DrLudicrous said.
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now