detecting special characters
Moderator: General Moderators
detecting special characters
while uploading a file if there is an specail character in it like " ' " how can i save the file with these special characters
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]
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]