<?php$user = "' OR id='1";$query = "SELECT * FROM table WHERE id='%s'";var_dump(sprintf($query, $user));print "\n<br />\n";var_dump(sprintf($query, AddSlashes($user)));?>