ok, so I have viewCalendar.php which calls makeCalendar.php
The calendar prints fine the first time, but then the links that
should take me back and forth through the months don't take me anywhere.
viewCalendar has this code to call makeCalendar:
include ( "../makeCalendar.php" );
//call the calendar
list( $month, $year ) = explode( ',', date( 'm, Y' ) );
pc_calendar( $month, $year );
and makeCalendar does this(plus a bunch more,
but this is the part that pertains to the link variables):
function pc_calendar( $month, $year, $opts = '') {
//set default options
if ( ! is_array( $opts ) ) {
$opts = array();
}
if ( ! isset( $opts['today_color'] ) ) {
$opts['today_color'] = '#FFFF00';
}
if ( ! isset( $opts['month_link'] ) ) {
$opts['month_link'] = '<a href="'.$_SERVER['PHP_SELF'].'?month=%d&year=%d">%s</a>';
}
list( $this_month, $this_year, $this_day ) = split( ',', strftime( '%m, %Y, %d' ) );
$day_highlight = ( ( $this_month == $month ) && ( $this_year == $year ) );
list( $prev_month, $prev_year ) = split( ',', strftime( '%m, %Y', mktime( 0, 0, 0, $month - 1, 1, $year ) ) );
$prev_month_link = sprintf( $opts['month_link'], $prev_month, $prev_year, '<');
list( $next_month, $next_year ) = split( ',', strftime( '%m, %Y', mktime( 0, 0, 0, $month + 1, 1, $year ) ) );
$next_month_link = sprintf( $opts['month_link'], $next_month, $next_year, '>');