Forum Moderators: coopster

Message Too Old, No Replies

php email validation warning..

how to disable this warning

         

smagdy

4:05 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



Hi,
I've PHP code that validates email (the email string and the domain)

and it workds well, but when some1 write wrong domain or somethin then it displays warning, so i want the handle the error myself.

so how to disable the warning?

this is the code that brings the warning;

if(fsockopen($Domain, 25, $errno, $errstr, 30))
{
return TRUE;
}
else
{
return FALSE;
}

Thanks in advance

Romeo

6:13 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



Hi Smagdy,

if you don't want a PHP function to report errors, put a '@' in front of the name, like
if (@fsockopen(...

Regards,
R.

mcibor

2:12 pm on Jun 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



or use
error_reporting(0);

This will turn off any error, notices and warnings that you may encounter. User won't know anything

smagdy

2:23 pm on Jun 12, 2005 (gmt 0)

10+ Year Member



Thanks a lot

the "@" worked well

but if I wana use this "error_reporting(0);" then where should I put it?

Birdman

3:59 pm on Jun 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

You will want to put it at the top of the script, before your coding starts.