Kryptix Posted May 11, 2010 Share Posted May 11, 2010 I'm making it so when a user signs up it e-mails them the details, but some users will enter a fake e-mail or something to cause an error, so how would I go about hiding all error messages from mail()? Also, is it wise to hide every error from everyone on a live site? I haven't really looked into it before. Quote Link to comment https://forums.phpfreaks.com/topic/201337-hide-mail-error-message/ Share on other sites More sharing options...
Muddy_Funster Posted May 11, 2010 Share Posted May 11, 2010 You do know that hiding a problem is not the same as fixing it? Rather than attempting to hide the error messages I would suggest fixing your code so that only email address which are formated correctly will be proccessed. This way at least any erronious email addresses will be left for the mail server to deal with. Quote Link to comment https://forums.phpfreaks.com/topic/201337-hide-mail-error-message/#findComment-1056284 Share on other sites More sharing options...
Kryptix Posted May 11, 2010 Author Share Posted May 11, 2010 You do know that hiding a problem is not the same as fixing it? Rather than attempting to hide the error messages I would suggest fixing your code so that only email address which are formated correctly will be proccessed. This way at least any erronious email addresses will be left for the mail server to deal with. I validate e-mails but you can still generate errors, such as using a e-mail with the same domain and stuff. I'd sooner just hide the error in case I miss something and it displays an error. How would I do that? Quote Link to comment https://forums.phpfreaks.com/topic/201337-hide-mail-error-message/#findComment-1056286 Share on other sites More sharing options...
Muddy_Funster Posted May 11, 2010 Share Posted May 11, 2010 change your error reporting at the very top of your page to <?php error_reporting(E_PARSE); //rest of code ?> Quote Link to comment https://forums.phpfreaks.com/topic/201337-hide-mail-error-message/#findComment-1056301 Share on other sites More sharing options...
jamesxg1 Posted May 11, 2010 Share Posted May 11, 2010 @mail() Use @ symbol before the var or function to suppress error's. James. Quote Link to comment https://forums.phpfreaks.com/topic/201337-hide-mail-error-message/#findComment-1056305 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.