I have an email address mike.o'malley@stack.com stored in a posted variable and I want a select statement in mysql to validate the existance of the email address and retrieve a password from my table. 
My query gets stuck at the apostophe when it trys to execute. eg "SELECT pwd FROM tbl\_users WHERE userName = '$email'";