swa66 - 10:11 pm on Nov 3, 2012 (gmt 0)
The best way ?
1. magic_quotes OFF -> it's evil.
2. stop using the mysql interface and use the mysqli (note the i) interface
3. use prepared statements instead of messing with escape sequences to stop mysql from eating up data as if it were commands.