You are here: preg_replace help? « PHP Programming Language « IT news, forums, messages
preg_replace help?

Posted by Trammel on 07/28/07 02:13

Im accepting user input from a text-box on a webpage.
I am then wanting to echo that back into the same box when the page is
submitted.

The problem I have is that the input COULD contain multiple quotes and
double-quotes.
AddSlashes doesnt seem to work properly, as it turns ' into \'
....and " just into \ (removing everything after)

I thought of using single-quotes for the Value='' and then use preg_replace
to replace all occurances of ' with \' ...but I cant figure-out how to do
it.

Anyone got any idea?



For example the user might have entered: ''''"""'"'"''"' (A collection of
quotes & double-quotes)
The input is stored in $myVar... and needs to be put BACK inside Value=''

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация