Celauran - THANK YOU!!!!! Your advice was right on. I have no idea what was off with my "valid" email addresses. Nothing visible to the eye. But, once I ran the variable through a trim, everything fell into place. Plus I got a bonus out of the process.Celauran wrote:Try calling trim() on the email addresses before validating them. ' duck@disney.com' is not a valid address (note the leading space).
One of the things I needed to do for "clean up" of data presented by users was to get rid of top rows where users entered titles into the .csv file. But.. using this process the title of the email column is not considered valid and so it is not allowed to proceed into the PDO block.
I've one other thing that needs to addressed to clean up user files before INSERT. If a user uploads a .csv file with quotation marks around all the values, how do I strip those quotation marks out of the string BEFORE extracting values and assigning them to variables in the foreach block?
Also, under the heading of, "never trust a user"... are there any other clean up processes I'm missing, besides those already discussed?
Thanks so much Celauran - your advice is really appreciated.
Pavilion