Notice: Use of undefined constant Quantity - assumed 'Quantity'
<p>I know that PHP is asking for a constant, but I don't understand why because the function still works.</p>

<p>I get the error:</p>

<pre><code>( ! ) Notice: Use of undefined constant Quantity - assumed 'Quantity'
              in C:\wamp\www\insert.php on line 13
Call Stack
#   Time    Memory  Function        Location
1   0.0006  372800  {main}          ..\insert.php:0 
</code></pre>

<p>I also receive the message I put in:</p>

<blockquote>
  <p>"Please only enter numerical values in quantity"</p>
</blockquote>

<pre><code>     &lt;?php
     // db connection
     $con = mysql_connect("localhost","root","");
     if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
     // selecting the table
     mysql_select_db("test", $con);

     if (!$_POST['Name'] == "" And !$_POST['Quantity'] == "") 
    {
        if (is_numeric($_POST[Quantity])) // &lt;--- line 13

    {
    $sql="INSERT INTO items (name, quantity) VALUES ('$_POST[Name]','$_POST[Quantity]')";                 

    if (!mysql_query($sql,$con))
    {
    die('Error: ' . mysql_error());
    }

    echo "1 record added"; 
    mysql_close($con)
    ?&gt;  
    &lt;?php
    header( 'Location: today.php' ) ;
}
else
{
    echo "&lt;h2&gt;Please only enter numerical values in quantity&lt;/h2&gt;";
}
    }
    else
    {
    echo "&lt;h2&gt;you can't add empty values!&lt;/h2&gt;";
    }
    ?&gt;
</code></pre>
