CaptainB
05-15-2008, 04:36 PM
Hi guys.
I have this script to post and saves contents to a .php file. However, if I try to add html to it, it will automatically insert slashes '\' in front of ' " '.
How would I disable that behavior in order to be able to parse html to the file?
<?php
$saving = $_REQUEST['saving'];
if ($saving == 1){
$data = $_POST['data'];
$file = "news.php";
$fp = fopen($file, "a") or die("Couldn't open $file for writing!");
fwrite($fp, $data) or die("Couldn't write values to file!");
fclose($fp);
echo "Saved to $file successfully!";
}
?>
I have this script to post and saves contents to a .php file. However, if I try to add html to it, it will automatically insert slashes '\' in front of ' " '.
How would I disable that behavior in order to be able to parse html to the file?
<?php
$saving = $_REQUEST['saving'];
if ($saving == 1){
$data = $_POST['data'];
$file = "news.php";
$fp = fopen($file, "a") or die("Couldn't open $file for writing!");
fwrite($fp, $data) or die("Couldn't write values to file!");
fclose($fp);
echo "Saved to $file successfully!";
}
?>