title: How to write the code for the back button?
body: <p>I have a php code here and I would like to create a &quot;back&quot; href to get me back to where I was before. Here's what I have:</p>
  <pre><code>&lt;input type=&quot;submit&quot; &lt;a href=&quot;#&quot; onclick=&quot;history.back();&quot;&gt;&quot;Back&quot;&lt;/a&gt;
  
       &lt;html&gt;
       &lt;head&gt;&lt;/head&gt;
       &lt;body&gt;
  
       &lt;?php
       // get form selection
       $day = $_GET['day'];
       // check value and select appropriate item
        if ($day == 1) {
        $special = 'Chicken in oyster sauce';
           }
        elseif ($day == 2) {
        $special = 'French onion soup';
         }
        elseif ($day == 3) {
         $special = 'Pork chops with mashed potatoes and green salad';
          }
        else {
        $special = 'Fish and chips';
        }
        ?&gt;
  
        &lt;h2&gt;Today's special is:&lt;/h2&gt;
         &lt;?php echo $special; ?&gt;
         &lt;input type=&quot;submit&quot; &lt;a href=&quot;#&quot; onclick=&quot;history.back();&quot;&gt;&quot;Back&quot;&lt;/a&gt;
         &lt;/body&gt;
         &lt;/html&gt; 
  </code></pre>