I know this has probably been discussed many of times... but I can't seem to find a single post that fixes my problem.
I keep getting problems when i type in: I'm a crazy person. The single quotation mark makes it appear in the page like I\'m a crazy person.
I tried using the htmlspecialchar() bit but it didn't help.
Here is my script....
<?php
$time = date("mhis");
$newfile = "files/$time.txt";
$fileopen = fopen("$newfile", "w+");
$fileopen2 = fopen("$newfile", "r");
$date = date("M j, Y");
$fixtext = htmlspecialchars("$posttext", ENT_QUOTES);
fputs($fileopen, "<b>$postname - $date</b><br>$fixtext<br><br>");
fclose($fileopen);
?>