title: Accessing a value from HTML form and storing in PHP variable
body: <p>I am trying to access a value from an HTML form, but it is not getting imported correctly.
  I am getting an error stating </p>
  
  <blockquote>
    <p>undefined symbol $numb </p>
  </blockquote>
  
  <p>(am trying to store my text input to <code>$numb</code>). </p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;html&gt;
  &lt;body&gt;
      &lt;?php
          if (isset($_POST['submit'])) $numb=$_POST['text'];
  
          if($numb&lt;1) {
              echo "Number &lt; 1"; 
          }
          else if (100&lt;$numb) {
              echo "Number &gt; 100";
          }
          else if($numb==2) {
              echo "Prime";
          }
          else if($numb%2==0) {
              echo "Not prime";
          }
          else {
              $flag=0;
          }
  
          for($count=3;$count&lt;sqrt($numb);$count=$count+2) {
              if($num%$count==0) {
                  $flag=1;
              }
              break;
          }
          if($flag==0) {
              echo "Not Prime";
          }
          else {
              echo "Prime";
          }
      ?&gt;
      &lt;form method="post" action="main.php"&gt;
          &lt;input type="text" name="text"&gt; &lt;input type="submit" value="Submit" name="submit"&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>