incineratemediadotnet
03-15-2008, 07:42 AM
Hey, if anyone could help it would be awesome
I am currently trying to intergrate openWYSIWYG into a custom CMS for a client.
I have called the desired file using fopen() into the editor.
"<form name="example" method="post" action="action.php">
<textarea id="textarea1" name="page" style="height: 600px; width: 800px;">
<?php
$myFile = "exampletest.php";
$fh = fopen($myFile, 'r+');
$theData = fread($fh,filesize("$myFile"));
fclose($fh);
echo $theData;
;?>
</textarea>
<script language="javascript1.2">
generate_wysiwyg('textarea1');
</script>"
Now i'm trying to post the file to an action page that will write the data.
<?php
$myFile = "exampletest.php";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh,$_POST["page"]);
echo $_POST["page"];
?>
All is well except when the page is echoed the image links change to
"http://www.incineratemedia.net/%22http://www.incineratemedia.net/graphics/header.jpg/%22" and so on as a result of $_POST.
Can can i avoid it writting script like this in a simple method?
I am currently trying to intergrate openWYSIWYG into a custom CMS for a client.
I have called the desired file using fopen() into the editor.
"<form name="example" method="post" action="action.php">
<textarea id="textarea1" name="page" style="height: 600px; width: 800px;">
<?php
$myFile = "exampletest.php";
$fh = fopen($myFile, 'r+');
$theData = fread($fh,filesize("$myFile"));
fclose($fh);
echo $theData;
;?>
</textarea>
<script language="javascript1.2">
generate_wysiwyg('textarea1');
</script>"
Now i'm trying to post the file to an action page that will write the data.
<?php
$myFile = "exampletest.php";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh,$_POST["page"]);
echo $_POST["page"];
?>
All is well except when the page is echoed the image links change to
"http://www.incineratemedia.net/%22http://www.incineratemedia.net/graphics/header.jpg/%22" and so on as a result of $_POST.
Can can i avoid it writting script like this in a simple method?