You are here: What is the correct way to escape POST variables? « All PHP « IT news, forums, messages
What is the correct way to escape POST variables?

Posted by Robert S on 07/12/06 12:34

I am doing a form that has a Text field which is repopulated with the
value of the field when the page is refreshed. If a user enters a
single quote, it comes back as \' and when the page is refreshed it
appears as \\\'. If I put in a double quote, I get a '\' character at
the end of the string and it gets truncated.

I realise that there are a lot of ways around this, but what is the
"recommended" way? stripslashes() certainly doesn't solve this and I
understand that it is supposed to be used in database queries.

TIA.

 

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

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