title: PHP $_GET['action']
body: <p>I am trying to teach myself PHP and have been doing so for a couple weeks now. I'm currently trying to wrap my head around GET and POST methods, particularly GET. This is just some basic code I wrote:</p>
  
  <pre><code>&lt;html&gt;
      &lt;form action="" method="GET"&gt;
          &lt;input type="submit" name="action" value="Laugh"&gt;
          &lt;input type="submit" name="action" value="Cry"&gt;
      &lt;/form&gt;
  &lt;/html&gt;
  
  &lt;?php
      $action = isset($_GET['action']) ? $_GET['action'] : NULL;
  
      switch ($action) {
          case 'Laugh': 
              echo 'You laughed!';
              break;
          case 'Cry':
              echo 'You cried!';
              break;
      }
  ?&gt;
  </code></pre>
  
  <p>Upon clicking the Submit buttons, the above code will display the case result respectively. This works for submit buttons. How would I obtain the same result if I were to use links instead of submit buttons? I'd like to be able to click on a link and have it take me to one of the switch cases. I have tried searching online, and I was unable to get any information on this.</p>
  
  <p>Thank you for your help!</p>