I want to have a text box where I can directly edit the html code. After submitting the form, the contents if textarea (with html tags) should be stored in the MySQL database. I use PHP to get the date and save it in the database. My problem is that the HTML is not properly sent to PHP. I do not get HTML code, only text. How can i fix this?
my form is as follows:
<form method="post" enctype="multipart/form-data" action="form.php"> <textarea name="html_code"> <a href="link">testlink</a> </textarea> <input type=submit value="submit"/> </form>
Now form.php will be able to display the contents of the text area
echo $_POST['html_code'];
shows: testlink
I want: <a href="link">testlink</a>
source share