Hi there. A very, very, very small few of you may remember me when I posted an error on my shoutbox. You guys fixed it and I am so happy. What concerns me is spammers with the name of "critique". I got the code, however if I go to the shoutbox, this notice appears:

Notice: Undefined index: namesh in /www/*******.com/*/*/*/********/htdocs/index.php on line 52

What does it mean and how do I get rid of it?

Code transcript:

<?php
    if ($_POST["namesh"] == 'critique') {
	echo('<meta http-equiv=\"refresh\" content=\"0;URL=http://*****************.com/spammer.html\" />');
    } else {
	echo(' ');
    }
?> 

P.S. To rippers: PLEASE don't rip this.

EDIT: Improper code

    Never mind, this code saved my butt:

    ini_set('display_errors', 0); 

    Thanks guys for your previous help however.

      much better to fix the notice than to stop showing all errors, if something breaks now you will have no idea why as php wont give its error message.

        In addition to what dagon said (which is definitely correct), your production environment (e.g. the website that the world sees) should never have display_errors enabled and should instead always have some form of error logging enabled (e.g. PHP's built-in error_log directive).

          Write a Reply...