Hi all,
I'm having difficulty removing non acsii characters that appear unwanted in my php script. I have some simple form fields in a Flash movie which are posted to php, until now I have only used the "stripslashes" command to remove the slash that appears before " ' " but there seem to be other unwanted ascii characters appearing which I'd like to strip out before posting such as for instance a "Â" character is added when the user types a £ symbol in the form. I was reading about the "FILTER_SANITIZE_SPECIAL_CHARS" command which can be used to strip out ascii characters below value 32 but I'm unsure how to use this or if this is the best method. My attempts to use it have only stopped the script processing so that it doesnt get as far as emailing the results at the end of my simple script.
I tried first something like the following:
$message = filter_input($message, FILTER_SANITIZE_SPECIAL_CHARS);
I think that was not the correct use of the command though.
I then tried:
$message=($message);
var_dump(filter_var($message,FILTER_SANITIZE_SPECIAL_CHARS));
this didn't work either
I also don't know whether the server that i have the site hosted on needs to have php configured to use this command?
Can anyone please tell me how to remove unwanted ascii characters from the php script. After a days Googling around I'm still really stuck.
Many thanks,
Terrence.