Page 1 of 1

ERROR with filter_var

Posted: Thu May 29, 2008 2:51 am
by bubble
hi guys, need help again, why filter_var cannot run in my comp

this is the script(just simple script)

Code: Select all

<?php
$email = "someone@exa mple.com";
 
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
 {
 echo "E-mail is not valid";
 }
else
 {
 echo "E-mail is valid";
 }
?>
and the error :
Fatal error: Call to undefined function: filter_var() in C:\......

can someone help me?
thx

Re: ERROR with filter_var

Posted: Thu May 29, 2008 2:59 am
by onion2k
I would imagine you don't have the PECL filter package installed. Instructions for installing it are on the filter_var page in the PHP manual.

Re: ERROR with filter_var

Posted: Thu May 29, 2008 3:21 am
by bubble
i've read the manual, but it's so complicated to me, can you make a simple description how to install it?

btw does any hosting already installed this function????

tq