Justin
10-11-2005, 08:58 AM
I have a textarea that when they sumbit the data, i want it to go into a file exactly how they entered the data into the textarea, currently it works fine, except it adds \' infront of ' and \" infront of "
$inputtext = $_POST['bodyofpage'];
$webphpfile = fopen ( "$location","w" );
flock ( $webphpfile, LOCK_EX);
fwrite ($webphpfile, $inputtext);
flock ( $webphpfile, LOCK_UN);
fclose ($webphpfile);
and the form i used
echo "<tr><td colspan=\"2\" align=\"center\"><textarea cols=70 rows=20 name=\"bodyofpage\">";
echo file_get_contents ( "$location" );
echo "</textarea></td></tr>";
$inputtext = $_POST['bodyofpage'];
$webphpfile = fopen ( "$location","w" );
flock ( $webphpfile, LOCK_EX);
fwrite ($webphpfile, $inputtext);
flock ( $webphpfile, LOCK_UN);
fclose ($webphpfile);
and the form i used
echo "<tr><td colspan=\"2\" align=\"center\"><textarea cols=70 rows=20 name=\"bodyofpage\">";
echo file_get_contents ( "$location" );
echo "</textarea></td></tr>";