Jump to content

accepting HTML in a form


lJesterl

Recommended Posts

im working on this site and i have a box called details. When I enter in html code and eveything is submited to MYSQL the information is messed up. The mysql will read &acute instead of some of the html code. When I enter the code manually through mysql the page displays fine. I have it as a textarea

    <textarea name='adedt[details]' rows='25' cols='40'>$adedt[details]</textarea>

I believe it filters out the '> on the end of the html tags. Would i do something in the php like $acute="'>"; ? Or is there an easier way to accept the HTML.
Link to comment
https://forums.phpfreaks.com/topic/27508-accepting-html-in-a-form/
Share on other sites

[quote author=lJesterl link=topic=115248.msg469184#msg469184 date=1163711318]
im working on this site and i have a box called details. When I enter in html code and eveything is submited to MYSQL the information is messed up. The mysql will read &acute instead of some of the html code. When I enter the code manually through mysql the page displays fine. I have it as a textarea

    <textarea name='adedt[details]' rows='25' cols='40'>$adedt[details]</textarea>

I believe it filters out the '> on the end of the html tags. Would i do something in the php like $acute="'>"; ? Or is there an easier way to accept the HTML.

[/quote]

what you want to do is:

<?php
echo "<textarea name='adedt[details]' rows='25' cols='40'>$adedt[details]</textarea>";
?>

that should work

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.