Hello, i have a textbox which i save the entered info into MySQL, but because i want to display this on a webpage i also save the HTML tags into the MySQL like so:
$product_description = htmlentities($_POST['product_description'], ENT_QUOTES);
$product_description = nl2br($product_description);
// write $product_description to database
This all works fine when the datadata is then retrieved and displayed on a web page. The problem occurs tho when i display this in a textbox so the user can edit thier description as it displays the HTML tags as well instead of redering them?
eg - this is what is displayed in the database driven textbox
dumme text<br /><br />
dumme text<br /><br />
<br /><br />
dumme text
Is there a way of not displaying the tags and rendering in a textbox as if it was HTML code.
Thanks