lJesterl Posted November 16, 2006 Share Posted November 16, 2006 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 ´ 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 More sharing options...
trq Posted November 16, 2006 Share Posted November 16, 2006 When you display ´ back in a broswer it should come out as > Link to comment https://forums.phpfreaks.com/topic/27508-accepting-html-in-a-form/#findComment-125778 Share on other sites More sharing options...
Seraskier Posted November 16, 2006 Share Posted November 16, 2006 [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 ´ 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:<?phpecho "<textarea name='adedt[details]' rows='25' cols='40'>$adedt[details]</textarea>";?>that should work Link to comment https://forums.phpfreaks.com/topic/27508-accepting-html-in-a-form/#findComment-125779 Share on other sites More sharing options...
roopurt18 Posted November 16, 2006 Share Posted November 16, 2006 Are you calling htmlentities on the form field before inserting it into the DB? Link to comment https://forums.phpfreaks.com/topic/27508-accepting-html-in-a-form/#findComment-125781 Share on other sites More sharing options...
roopurt18 Posted November 16, 2006 Share Posted November 16, 2006 You probably also want to surround [i]details[/i] with single quotes: $adedt['details'] Link to comment https://forums.phpfreaks.com/topic/27508-accepting-html-in-a-form/#findComment-125782 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.