if i insert multiple e-mail id in To textbox like below , how can i validate the email ids.
<user1@example.com>, <user1@example.com>, "User 3" <user3@example.com>, "User 4" <user4@example.com>,
in google if we insert ids like above or comma separated , it will accept . anybody know the coding to validate this in PHP
2 1635 Atli 5,058
Expert 4TB
Hey.
Have you tried this yourself?
What did you try? Why/how didn't it work?
We are happy to help you develop your code, but we won't do it for you.
However, you are probably going to want to use a regular expression to do this. There are plenty of email-validation scripts available via Google. You would just have to adapt them to validate multiple addresses.
Yes I try this like below , my input E-mail id is - $email = '"USER1" <user1@example.com>,"USER2" <user2@example.com>,
-
"User 3" <user3@example.com>, "User 4" <user4@example.com>, ";
-
-
-
$find = array('"Yunus Mecheri"','"unaise hameed"');
-
-
-
$arr = str_replace($find," ",$email,$i);
-
$arr = str_replace(">"," ",$email,$i);
-
$arr = str_replace("<"," ",$arr,$i);
-
-
$final_email_ids = str_replace($find," ",$arr,$i);
if i enter array() manually , ie: $find . it will work , and it will give the output like
below :
user1@example.com,user2@example.com,user3@example. com,
use51@example.com,user4@example.com,
but if i use array to find the value automatically ie:instead of $find if i use like below , - ARRAY( 0 =>"USER1"
-
1 =>"USER2"
-
2 =>"USER3"
-
3 =>"USER3"
-
4 =>"USER4"
-
)
it will not work .
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chris Kennedy |
last post by:
Does anyone know a regular expression that will validate the file extension
but also allow multiple file extensions if necessary. It also needs to be
case insensitive. Basically, what I want is to...
|
by: Brybot |
last post by:
I have a form that i've split up into multiple asp:panels, each panel
has a number of validators which work correctly.
At on the last panel, i want to commit the data collected to a
database. I...
|
by: SkipNRun |
last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list.
...
|
by: Mike Hofer |
last post by:
Please forgive the cross-post to multiple forums. I did it
intentionally, but I *think* it was appropriate given the nature of my
question.
I'm working on an open source code library to help...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |