title: php : action on form's not working- beginner
body: <p>I'm beginner to php, so I have a small problem with doing an action when submitting a form</p>
  
  <p>The form is something like that</p>
  
  <pre><code>&lt;form name="form1" method="post" action="?flag=1"&gt; 
    &lt;input type="submit" name="button" id="button" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the php code - on the same page-</p>
  
  <pre><code>&lt;?php
  
  if ($flag) {echo "Helllllllllo";}
  ?&gt;
  </code></pre>
  
  <p>and it didn't work, I tried to make the action on other page like  <code>action="otherpage.php?flag=1"</code></p>
  
  <p>but also it didn't work
  any help pls :) ?</p>