email php update

working to fix duplicate email issue
last round changes