Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

escaping values in a variable?

Status
Not open for further replies.

fowlerlfc

MIS
Mar 20, 2002
136
US
First of all, I am a newbie, so please excuse my ignorance!

I've built a php script that adds workorders to a mysql database. Everything is working great, except when someone submits a workorder with an apostrophe in it. Is there a php function or regexp that I can use to escape the apostrophe?

Thanks in advance for all your help!
 
addslashes($string) Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Anikin,

Thanks again for your help.

I solved my problem by setting magic_quotes=On in the php.ini.
 
that's another way of solving the problem Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top