i need to enter a string to my database, this string may contain this caracter :'
, i wasn't able to enter this until i used addslashes(
) function, however when trying to display the string manipulated with the addslashes()
later to the user it appears with the slash
$this->adresse=addslashes($this->adresse);//example : L'Arc
when trying to display it later i got : L\'Arc
for inserting into database i use the PDO
like this :
$req=$bdd->prepare('Insert into ...
can you please help me, i want to prevent this caracter '
into the query but in the other side i don't want that the \
will be shown with the string .