title: A anchor as submit button with value
body: <p>This may seem like a duplicate question but I have googled and search stackoverflow how an a anchor tag would act like as a submit that would fit on the website that I am trying to do.</p>
  
  <p>I have this code on my right panel navigation:</p>
  
  <pre><code>&lt;div class="content clearfix"&gt;
  &lt;div class="left_column"&gt;
      &lt;div class="product_menu"&gt;
          &lt;? if($_SESSION['logged_in'] == 1) {
          $customer_panel = '
          &lt;div class="customer_nav"&gt;
          &lt;h1 class="customer_nav_name"&gt;Hello ' .  $_SESSION['fname'] . ',&lt;/h1&gt;
          &lt;ul class="clearfix"&gt;
              &lt;li&gt;&lt;a href="#"&gt;View Profile&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=""&gt;Update Information&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;
              &lt;!-- this is where i would like the signout button to act as a submit
                   i have left it plane to start from scratch --&gt;
                  &lt;a href=""&gt;Sign Out&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
          &lt;/div&gt;';
  
          echo $customer_panel;
          }?&gt;
          &lt;h2&gt;&lt;span&gt;Product Categories&lt;/span&gt;&lt;/h2&gt;
          &lt;ul id="prod_nav" class="clearfix"&gt;
  
              &lt;li class="top"&gt;&lt;a href="#" class="top_link"&gt;&lt;span&gt;Processed Meat&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class="top"&gt;&lt;a href="#" class="top_link"&gt;&lt;span&gt;Ready Made&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class="top"&gt;&lt;a href="#" class="top_link"&gt;&lt;span&gt;Siomai &amp;amp; Siopao&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li class="top"&gt;&lt;a href="#" class="top_link"&gt;&lt;span&gt;English Pork Snacks&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And here is my usual code when i use a submit button and not an anchor tag to make a POST method:</p>
  
  <pre><code>if(isset($_POST['signout'])) { // logout button
  // Clear and destroy sessions and redirect user to home page url.
  $_SESSION = array();
  session_destroy();
  // Redirect to where the site home page is located -- Eg: localhost
  header('Location: http://localhost/');
  }
  </code></pre>
  
  <p>I have read many of this questions but I don't know jQuery or how to achieve this using javascript.</p>
  
  <p>I also tried using this solution:</p>
  
  <pre><code>&lt;form id="signout" action="index.php" method="post"&gt;
  &lt;a href="javascript:;" onclick="document.getElementById('signout').submit();"&gt;Sign Out&lt;/a&gt;
  &lt;input type="hidden" name="signout" value="signout"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>that I kinda found from <a href="https://stackoverflow.com/questions/8169027/how-can-i-submit-a-post-form-using-the-a-href-tag/">here at stackoverflow</a>. </p>
  
  <p>The problem about this is that if I include the <code>onclick=""</code> , the whole page does not show. but if i remove it, the page comes back to normal. - it doesn't work inside an <code>&lt;li&gt;</code> element.</p>
  
  <p>It might sound basic, but it would help me and other new starters to understand how to make it possible. Thank you very much. :)</p>