does anyone know why this code does not work
i think the problem is the if statement
<?php
if
( (isset($REQUEST['year'])) && (isset($REQUEST['month'])))
{
$lastdate = date ("Y m",mktime(0,0,0,$REQUEST['month']-1 ,date("d") ,$REQUEST['year']) );
$nextdate = date ("Y m",mktime(0,0,0,$REQUEST['month']+1 ,date("d") ,$REQUEST['year'])));
$currentdate = date ("Y m",mktime(0,0,0,$REQUEST['month'] ,date("d") ,$REQUEST['year'])));
$lastmonth = date ("m" ,mktime(0,0,0,$REQUEST['month']-1 ,date("d") ,$REQUEST['year']) );
$nextmonth = date ("m" ,mktime(0,0,0,$REQUEST['month']+1 ,date("d") ,$REQUEST['year'])));
$currentmonth = date ("m" ,mktime(0,0,0,$REQUEST['month'] ,date("d") ,$REQUEST['year'])));
$lastyear = date ("Y" ,mktime(0,0,0,$REQUEST['month']-1 ,date("d") ,$REQUEST['year']) );
$nextyear = date ("Y" ,mktime(0,0,0,$REQUEST['month']+1 ,date("d") ,$REQUEST['year'])));
$currentyear = date ("Y" ,mktime(0,0,0,$REQUEST['month'] ,date("d") ,$REQUEST['year'])));
}
else
{
$lastdate = date ("Y m",mktime(0,0,0,date("m")-1 ,date("d") ,date("Y")));
$nextdate = date ("Y m",mktime(0,0,0,date("m")+1 ,date("d") ,date("Y")));
$currentdate = date ("Y m",mktime(0,0,0,date("m") ,date("d") ,date("Y")));
$lastmonth = date ("m" ,mktime(0,0,0,date("m")-1 ,date("d") ,date("Y")));
$nextmonth = date ("m" ,mktime(0,0,0,date("m")+1 ,date("d") ,date("Y")));
$currentmonth = date ("m" ,mktime(0,0,0,date("m") ,date("d") ,date("Y")));
$lastyear = date ("Y" ,mktime(0,0,0,date("m")-1 ,date("d") ,date("Y")));
$nextyear = date ("Y" ,mktime(0,0,0,date("m")+1 ,date("d") ,date("Y")));
$currentyear = date ("Y" ,mktime(0,0,0,date("m") ,date("d") ,date("Y")));
}
echo "<a href=self.php?month=$lastmonth&year=$lastyear>previous</a>";
echo "<a href=self.php?month=$currentmonth&year=$currentyear>current</a>";
echo "<a href=self.php?month=$nextmonth&year=$nextyear>previous</a>";
?>