Is
$username = $_POST['username'];
$sanitizedUsername = strip_tags(stripcslashes($username));
enough to prevent malacious sql injections and other types of attacks. If not what else should I use?
P.S. I want to allow users to choose usernames and passwords that contain alphanumeric, space and symbol characters (except those like quotes or asterisks that are used in mysql statements).