So what is happening is I have a content editable DIV that i would like to be able to put code into and then hit save! I can do this with normal text and it saves fine, but when trying to save code it saves it as "<img>" instead of ""
Here is the code I am using to save the text to a file:
<?php
$news = $_POST['data'];
$myfile = fopen("../News/newspagedata.php", "w") or die("Unable to open file!");
fwrite($myfile, $news);
fclose($myfile);
?>
Any Help would be greatly appreciated!
Aucun commentaire:
Enregistrer un commentaire