title: PHP GET method in <a href>
body: <p>I am creating a calendar function in php. Along with the function I need a "previous" and "next" link that show the previous or next month using the GET method. The links don't work the way I expect them to. From what I've found through debugging it doesn't look like it's actually adding or subtracting 1 from month. </p>
  
  <p>This is currently what I have:</p>
  
  <pre><code>$month=$_GET["month"];//should initially set them to null?
  $year=$_GET["year"];
  
  //previous and next links
  echo "&lt;a href='calendar.php?month=&lt;?php echo ($month-1)?&gt;'&gt;Previous&lt;/a&gt;";
  echo "&lt;a href='calendar.php?month=&lt;?php echo ($month+1)?&gt;'&gt;Next&lt;/a&gt;";
  
  //Calls calendar method that returns the calendar in a string
  $calDisplay=calendar($month,$year);
  echo $calDisplay;
  </code></pre>