PHP - "Notice: Undefined index" error
<p>Notice: Undefined index: subject in /var/www/mailer.php on line 12 Notice: Undefined index: message in /var/www/mailer.php on line 13 Notice: Undefined index: from in /var/www/mailer.php on line 14 Notice: Undefined index: verif_box in /var/www/mailer.php on line 15 Notice: Undefined index: tntcon in /var/www/mailer.php on line 23 no variables received, this page cannot be accessed directly</p>

<p><strong>BELOW IS THE CODE</strong></p>

<pre><code>&lt;?php

ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

// -----------------------------------------
//  The Web Help .com
// -----------------------------------------
// remember to replace you@email.com with your own email address lower in this code.

// load the variables form address bar
$subject = $_POST["subject"];
$message = $_POST["message"];
$from = $_POST["from"];
$verif_box = $_POST["verif_box"];

// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);

// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
    // if verification code was correct send the message and show this page
    mail("abhijit.infogence@gmail.com", 'TheWebHelp.com Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
    // delete the cookie so it cannot sent again by refreshing this page
    setcookie('tntcon','');
} else if(isset($message) and $message!=""){
    // if verification code was incorrect then return to contact page and show error
    header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&amp;from=$from&amp;message=$message&amp;wrong_code=true");
    exit;
} else {
    echo "no variables received, this page cannot be accessed directly";
    exit;
    }
?&gt;
</code></pre>
