Jump to content

Archived

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

bilis_money

How to input <HTML> formatted string inside MySQL table?

Recommended Posts

If hope this is possible.

i want to input [code]"<br>Testing<b>"[/code] inside MySQL database.
and to be able to display it back up again in <HTML> format string.

Is this possible? a simple snippet of codes for this will bendicate me.

thank you very much in advance.

Share this post


Link to post
Share on other sites
i guess the function --> htmlspecialchars
will solve this problem, ok i'll try to figure it out by myself.

But if you have smarter way to do this then please tell me.

Share this post


Link to post
Share on other sites
When storing the string in your database use the function mysql_real_escape_string(), when sending it to the browser, use htmlentities().

Ken

Share this post


Link to post
Share on other sites

×

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.