Page 1 of 1
detecting special characters
Posted: Mon Dec 20, 2004 2:35 am
by localhost
while uploading a file if there is an specail character in it like " ' " how can i save the file with these special characters
Posted: Mon Dec 20, 2004 4:03 pm
by timvw
you are already saving it.......
if you save it in a database, you probably need to escape it... mysql has for example [php_man]mysql_escape_string[/php_man]
if you want to output it again, you probably need to [php_man]stripslashes[/php_man] first as they were added by mysql_Escape_string..
and as you already know, html doesn't display \r\n as a newline... but wants <br> for that... to accomplish this, you need [php_man]htmlentities[/php_man]