Hi,
how do i properly store my php and html code in mysql ?
ok i have text area and i would paste my php and html code inside the text area and then insert it to table
i use this but the code is not displaying correctly when i call it
PHP Code:
<textarea rows='6' cols='40' name='content'></textarea>
PHP Code:
$content = mysql_real_escape_string(htmlspecialchars($_POST['content']));
let say i want to paste this..
PHP Code:
<?php echo 'hello world<br>'; ?>
this is just an example..the actual code that i want to paste is a bit long
the code is change to
PHP Code:
<?php echo \'hello world<br>\'; ?>
in database
in browser it is display like this
Help !!
Thank you in advance
Bookmarks