I'm using this lovely, simple php script to write data to a file line by line. Now that I've used it a while, I ran into a little problem. I need to put quotes in some of my data now. The script writes a nice / to go along with it. Can someone adjust my script so that it likes quotes and these things ----> ' (I forgot what they are called). Thanks! Oh, and I want it to say "Your data has been submitted" on a new page (not an alert) after being submitted.
<?
if($_POST):
$thefile="../dynamic/snowreport.txt";
$handler=fopen($thefile,"w");
foreach($_POST as $k=>$v)
fwrite($handler,"$v\n");
fclose($handler);
endif;
?>
Simple Question: Writing to file with quotes, etc.
Moderator: General Moderators