trying to make feedback page : <p>I am making feedback page, but it is producing some errors.
i don't understand what is wrong. Please help me figure out where i am doing wrong.
when i submit the form the errors goes away and produce right result,but when i refresh the page it produces same errors again</p>

<pre><code>&lt;?php
$name = $_POST['name'];       // error undefined index name
$suggestion = $_POST['suggest'];  // error undefined index suggest
$opinion = $_POST['opinion']; // error undefined index opinion
$submit = $_POST['submit']; // error undefined index submit

if(isset($submit)){
    $sql= mysqli_query($con,"insert into feedback (name,suggestion,opinion) values ('$name','$suggestion','$opinion')");
    if($sql==true){?&gt;
        &lt;div class="alert alert-info"&gt;
       Thankyou for your suggestions. we will notify the admins.
&lt;/div&gt;
&lt;?php
    }

}


?&gt;
&lt;body&gt;
&lt;div class="feedback"&gt;

&lt;form action="feedback.php" method="post"&gt; 
&lt;h1&gt; Help us improve our website&lt;/h1&gt;
&lt;h2&gt;Please drop your suggestion below&lt;/h2&gt;

  &lt;div class="form-group"&gt;
    &lt;label &gt;Your Name:&lt;/label&gt;
    &lt;input type="text" class="form-control" name="name" required&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
    &lt;label for="comment"&gt;Your suggestion&lt;/label&gt;
  &lt;textarea class="form-control" name="suggest" rows="5" id="comment" required &gt;&lt;/textarea&gt;
  &lt;/div&gt;
    &lt;p&gt;Were you satisfy with this website?&lt;/p&gt;
   &lt;label class="checkbox-inline"&gt;
      &lt;input type="checkbox" name="opinion"value="1"&gt; yes
    &lt;/label&gt;
    &lt;label class="checkbox-inline"&gt;
      &lt;input type="checkbox" name="opinion" value="2"&gt; no
    &lt;/label&gt;
    &lt;label class="checkbox-inline"&gt;
      &lt;input type="checkbox" name="opinion" value="3"&gt; may be
    &lt;/label&gt;
    &lt;br /&gt;&lt;br /&gt;
  &lt;button type="submit" name="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;

&lt;/form&gt;


&lt;/div&gt;
&lt;/body&gt;
</code></pre>
