htmlentities

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

    htmlentities

    Hello all,



    I want to save real HTML tags into my mysql database.
    I use
    $p = htmlentities($c ontent);
    to convert the strange characters to real html.
    Then from another page i echo the content from the database and i see real
    html tags which is what i want.
    But in the database its still saved as:
    p><strong >sdfsdfsdfsd fsdfsdf</stro.

    How can i save normal HTML tags in my database??

    Thanks a lot

    Danny


  • Geoff Berrow

    #2
    Re: htmlentities

    Message-ID: <43c12630$0$100 88$ba620dc5@tex t.nova.planet.n l> from Danny
    contained the following:
    [color=blue]
    >$p = htmlentities($c ontent);
    >to convert the strange characters to real html.[/color]

    That isn't what it does. HTML is just text. Store it in your database
    without modification.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • Danny

      #3
      Re: htmlentities

      The problem is that im using a rich text script and $content is alreay
      handled somehow with htmlspecialchar s where the problem starts
      I cant get normal tags into my database.

      PLease check for urselff http://www.kevinroth.com/
      [color=blue]
      >[color=green]
      >>$p = htmlentities($c ontent);
      >>to convert the strange characters to real html.[/color]
      >
      > That isn't what it does. HTML is just text. Store it in your database
      > without modification.
      >
      > --
      > Geoff Berrow (put thecat out to email)
      > It's only Usenet, no one dies.
      > My opinions, not the committee's, mine.
      > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]


      Comment

      • Geoff Berrow

        #4
        Re: htmlentities

        Message-ID: <43c12ba6$0$100 79$ba620dc5@tex t.nova.planet.n l> from Danny
        contained the following:
        [color=blue]
        >The problem is that im using a rich text script and $content is alreay
        >handled somehow with htmlspecialchar s[/color]

        I doubt it. Read the manual.
        --
        Geoff Berrow (put thecat out to email)
        It's only Usenet, no one dies.
        My opinions, not the committee's, mine.
        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

        Comment

        • Jerry Stuckle

          #5
          Re: htmlentities

          Danny wrote:[color=blue]
          > The problem is that im using a rich text script and $content is alreay
          > handled somehow with htmlspecialchar s where the problem starts
          > I cant get normal tags into my database.
          >
          > PLease check for urselff http://www.kevinroth.com/
          >
          >[color=green][color=darkred]
          >>>$p = htmlentities($c ontent);
          >>>to convert the strange characters to real html.[/color]
          >>
          >>That isn't what it does. HTML is just text. Store it in your database
          >>without modification.
          >>
          >>--
          >>Geoff Berrow (put thecat out to email)
          >>It's only Usenet, no one dies.
          >>My opinions, not the committee's, mine.
          >>Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]
          >
          >
          >[/color]

          1. Please don't top post.

          2. Geoff is correct - HTML is just text. Why could $content already
          processed with htmlspecialchar s?

          3. No idea what I'm looking for. This is just plain html text, like I
          would expect it to be.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...