Page 1 of 1

i have problem with slashes and quotes!

Posted: Wed Aug 01, 2012 3:05 am
by mekha
i have problem with slashes and quotes!...

hi,i get the word like this:
if the word is: art"ssef
i get it like this:
art"/ssef
---
sometimes get it like that too:
art
and the "ssef is removed!....can some ne help me please ?

Re: i have problem with slashes and quotes!

Posted: Wed Aug 01, 2012 3:18 am
by mixa2000
Try this, this should totally work, please reply if it does. :)

Code: Select all

<?php
echo ('art"seff');
?>

Re: i have problem with slashes and quotes!

Posted: Wed Aug 01, 2012 4:00 am
by mekha
no no man, i know thats work....but i mean php & mysql ... sorry i forgot to say thant :crazy:

Re: i have problem with slashes and quotes!

Posted: Wed Aug 01, 2012 4:31 am
by social_experiment
When you display data from a database you can use stripslashes() to remove any slashes used to escape certain characters (like " or ') and then you should use htmlentities() to convert the characters (" and ' among others) to html-safe characters.

Re: i have problem with slashes and quotes!

Posted: Wed Aug 01, 2012 2:07 pm
by mixa2000
Well yes you didn't mention about "php & mysql" that's why I answered it that way.