How would I be able to insert code snippet into a database and then display that code in a textarea identically to when I inserted it.
When comparing the code in & out, they are never the same, for some reason I can't get it to work.
$db = new sqlite3('test.db');
$r = $db->query("select * from test where id='1'");
$f = $r->fetchArray();
echo "<textarea rows='10' style='width:500px;'>$f[data]</textarea>";
$db->close();
this is the code I'm testing
't apple \n\r
♦ ♦ ♦ black (solid) diamond suit
<textarea></textarea>
$£%^&*()!@">RWH{{@£})"":?'
<form>dfddf
<input type="button">
</form>
How can I insert it into the database correctly to display the data identically within the textarea?