Afficher un message
Vieux 18/09/2007, 15h26   #4
Al
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP "preg_replace"

Just use stripslashes() on your submitted data and forget about testing for
magic_quotes. It's good practice anyhow. \" is not legit text regardless.



haim Chaikin wrote:
> Hello,
>
>
>
> I am a beginner in PHP. I need with the function preg_replace.
>
> I am trying to remove the backslashes ( \ ) from a string that is submitted
> by the user.
>
> It is submitted in a form but it adds \ before the quotation marks ( " ).
>
> Will this change if I use the GET method instead of POST.
>
> If not can you please tell me how to use preg_replace to remove the
> backslashes.
>
>
>
> Thank You,
>
> Chaim Chaikin
>
> Novice PHP programmer
>
> Hotwire Band Website Administrator
>
> http://hotwire.totalh.com
>
>

  Réponse avec citation
 
Page generated in 0,05971 seconds with 9 queries