1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP strip_tags, solution? please help

Discussion in 'PHP' started by monkeyclap, Feb 10, 2010.

  1. #1
    hi i have a form and to stop it rendering tags i am using strip_tags, but is there a way of displaying the tags but not processing them

    i.e. if someone puts in <a href="http://www.example.com">example.com</a> then that is exactly what will be posted as the result, and not just a blank/empty field.

    thanks
     
    monkeyclap, Feb 10, 2010 IP
  2. Nei

    Nei Well-Known Member

    Messages:
    106
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    170
    #2
    As I understand, you should use the function htmlspecialchars. It "Convert special characters to HTML entities".
     
    Nei, Feb 10, 2010 IP
    monkeyclap likes this.
  3. monkeyclap

    monkeyclap Active Member

    Messages:
    836
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    85
    #3
    fanastic job, just what i needed! :D :D
     
    monkeyclap, Feb 10, 2010 IP