Fixed an if statement so that it actually return false when query not true. ($success is never = to false)