title: PHP if(isset($_POST...)) condition FAIL
body: <p>PHP problem here, I've made a login/logout kind code, with a <code>insert</code> and <code>delete</code> function that stand by <code>login</code> and <code>logout</code>.</p>
  
  <p>So the problem is that after I insert the the text I simply cannot delete it, cause the delete button is like a simple
  turn back botton, and doesn't make his work, nothing
  in the <code>if(isset($_POST['delete']))</code> condition seems to work.</p>
  
  <p>May the problem be that I'm using two void action
  that refer to the same page? cause the first button
  work and the second not.</p>
  
  <p>Anyone can understand why? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
    &lt;header&gt;&lt;/header&gt;
    &lt;body&gt;
      &lt;!-- START PHP --&gt; 
      &lt;?php
        //If not submit i put the submit form
        if(!isset($_POST['send'])){
          echo "&lt;form name='send' action='' method='POST'&gt;
            &lt;input type='text' name='text' value=''/&gt;
            &lt;input type='submit' name='send' value='send' /&gt;
            &lt;/form&gt;";
        }&lt;!-- IF END --&gt; 
  
        //If submit was set I insert $text into the db and I render
        //the delete button
        else {
          $conn= mysql_connect('localhost','root','');
          mysql_select_db('db_try',$conn ) or die(mysql_error());
          $dato=$_POST['dato'];
          mysql_query(" INSERT INTO test (value) VALUES ('$text') ") or die(mysql_error());
          echo "Operation complete";
  
          //Now i render the delete submit button...
          echo "&lt;form name='delete' action='' method='POST'&gt;
            &lt;input type='submit' name='delete' value='delete' /&gt;
            &lt;/form&gt;";
  
          //...and if i push it NOTHING, like it's only
          //a return to the first form button
          if(isset($_POST['delete'])){
            mysql_query(" DELETE FROM test WHERE value='$text' ") or die(mysql_error());
            echo "&lt;br&gt;Text'".$text."' deleted";
          }
        }&lt;!-- ELSE END--&gt; 
      ?&gt;&lt;!-- END PHP --&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>