Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
if(!filter_var($email, FILTER_VALIDATE_EMAIL))


is used this code
this worked for times
but after 3 mounth
it dosent work
what should id do?
my php is version 5.3.5
if i write invalid email says invalid
if i write valid email says invalid
but i made an other page that test the code its worked true
but in my original page not work true!!!
Posted
Updated 8-Jul-14 3:10am
v8
Comments
Mohibur Rashid 7-Jul-14 20:27pm    
what does this even mean? did you down grade your php version? Because reference says it would work if the php5 version is greater or equal of 5.2.0. Tell us details about the changes you made through out your system.
saeed rajabi 8-Jul-14 7:07am    
if you write true email say invalid
if you write false email say invalid
my php version is 5.3.5
i test this code in an other page its worked true but this page?!!!!
Mohibur Rashid 8-Jul-14 18:31pm    
How about checking $email value, what it actually contains

1 solution

It seems that the function requires 3 parameters, and you have 2.
PHP
$var = filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_NULL_ON_FAILURE);

My reference is http://www.php.net/manual/en/function.filter-var.php[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900