Guest 4thgear Posted March 11, 2005 Share Posted March 11, 2005 I have discover a problem with email addresses at checkout. If a customer has an email address dashes in it they get this error message... <b>Either no email was entered or it was not valid!</b> Example of email addressess affected: [email protected] [email protected] Anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
Guest twisted Posted March 16, 2005 Share Posted March 16, 2005 This is the code in customers.php that determines which characters are "Allowed" in email addresses. "// make sure email was entered or valid if ((!ereg("^[a-zA-Z0-9_.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))or(empty($email)))" As you canb see...dashes are permitted...so in short..............no idea. You might try changing this: if ((!ereg("^[a-zA-Z0-9_.] to this: if ((!ereg("^[a-zA-Z0-9_.\-] And yes, the dash has to be escaped with a \ HTH Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2005 Share Posted March 16, 2005 (Note that there are 2 locations in the customer.php file where you need to make that change...) Quote Link to comment Share on other sites More sharing options...
Guest twisted Posted March 16, 2005 Share Posted March 16, 2005 I smetiems think that some things should go without saying,,,but I should know better. I implied that the code I posted should be corrected wherever it occurs. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.