HTML Reminder someone
Results 1 to 10 of 10

Thread: HTML Reminder someone

  1. #1
    Senior Member
    Join Date
    Apr 2004
    Posts
    228

    HTML Reminder someone

    OK guys I'm stuck again, as usual

    I need to put in some text that looks like html tags. I remember there was a tag that means that html stops interpretin anything within it. But don't remember it of the top of my head, and as usual in such cases can't find it anywhere

    Does anyone remember it?
    Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying

  2. #2
    Disgruntled Postal Worker fourdc's Avatar
    Join Date
    Jul 2002
    Location
    Vermont, USA
    Posts
    797
    Remark tag
    <!-- the remark goes here -->
    ddddc

    "Somehow saying I told you so just doesn't cover it" Will Smith in I, Robot

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Posts
    228
    Quote Originally Posted by fourdc
    Remark tag
    <!-- the remark goes here -->

    This one stops HTML from showing anything that's within it, But I need it to show the text within it, but not interprete it
    Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying

  4. #4
    Senior Member
    Join Date
    Apr 2004
    Posts
    228
    Now the problem seems to be a bit deeper then I originaly thought. I guess I'll have to describe the full situation.

    I have a function in PHP that displays text out of DB, it then puts this text in to a hiden variable that posts it to another page.

    The code is

    echo '<td>' . $error_reason . '<br> <br> <input type="submit" value="Update"> </td>';

    for displaying the variable with the text

    echo '<input type="hidden" name="error_reason" value="' . $error_reason . '"/>';

    for the hiden value

    Now whenever going through this code, the browser has problems with the text that got double quote marks in it.
    Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying

  5. #5
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    Are these the functions you were looking for?

    htmlspecialchars or htmlentities
    Last edited by SirDice; February 9th, 2007 at 11:30 AM.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  6. #6
    Senior Member
    Join Date
    Apr 2004
    Posts
    228
    I solved the problem a bit differently, but this one is definately a good one for the future
    Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying

  7. #7
    Senior Member JPnyc's Avatar
    Join Date
    Jan 2005
    Posts
    2,734
    &gt; and &lt;

  8. #8
    Webius Designerous Indiginous
    Join Date
    Mar 2002
    Location
    South Florida
    Posts
    1,121
    A quick and dirty method of stopping html from being parsed is to enclose it in the following tags:

    <XMP>


    </XMP>


    I don't think its valid, but it works.

    -xmaddness

  9. #9
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Think <pre> </pre> still works too...though its not supported anymore...
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  10. #10
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Nope, it doesn't. You can have tags inside <pre></pre> and they will be interpreted.

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

Similar Threads

  1. How-to on HTML Basics
    By al1aprize in forum Other Tutorials Forum
    Replies: 0
    Last Post: March 15th, 2004, 01:32 AM
  2. Is read/write for scripts on public html a dumb idea?
    By HippoDuck in forum Web Security
    Replies: 7
    Last Post: April 8th, 2003, 12:37 PM
  3. insert a *.exe in html file
    By doxical in forum Newbie Security Questions
    Replies: 5
    Last Post: February 27th, 2003, 12:02 AM
  4. HTML Tutorial
    By jethro in forum Other Tutorials Forum
    Replies: 8
    Last Post: June 25th, 2002, 07:19 PM
  5. Basic HTML
    By hot_ice in forum Other Tutorials Forum
    Replies: 10
    Last Post: March 11th, 2002, 06:18 PM

Posting Permissions

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