title: How can I convert my button into a hyperlink in PHP?
body: <p>I need to replace a button on my web page with a hyperlink.
  I am calling a PHP script using the button.</p>
  
  <p>I extract the id using the following statement:</p>
  
  <pre><code>$id = $_POST['id']; 
  </code></pre>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;form id="test1" method="post" action="my.php?action=show"&gt;
    &lt;input type="hidden" name="id" id="id" value="1" /&gt;
    &lt;input type="submit" name="submit" value="Click" onclick="return display(1);" /&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>Here is what I came up with:</p>
  
  <pre><code> &lt;a href="my.php?action=show&amp;id='1'" onclick="return display(1);"&gt; Click&lt;/a&gt;
  </code></pre>
  
  <p>Does my code have a flaw?  Is there a better approach?</p>