I currently have
$p4q6_text = preg_replace("/[^\w\d\s]/", "", ($_POST['$p4q6_text']));
if($p4q6_text=="") $p4q6_text = "-8";
My hope was to only allow alphanumeric chars through [a-zA-Z0-9] and spaces. I wanted to especially remove quotes or \r\n... or replace double quotes with quotes because I'm saving the contents of the text box into a CSV file.
However, it appears that my preg_replace is simply stripping out EVERY character. My if statement is to replace no reply with "-8".... but every reply seems to have a -8.
Any help would be appreciated. I read a lot tonight on regular expressions but I'm just not getting it.
Thanks,
Doug