<?
function next_week($target_week_day)
         {         
         $date = getDate();
            
         $day = $date["mday"];
         $week_day = $date["wday"];
         $month = $date["mon"];         
         $year = $date["year"];
         
         //This assumes that if today is a target week day,
         //today's date will be used and not next week's.
         //To change that, just make
         //if($week_day <= $target_week_day)
         //if($week_day < $target_week_day)
         if($week_day <= $target_week_day)
            $days_left = $target_week_day - $week_day;
         else
            $days_left = 7 - ($week_day - $target_week_day);
         
         //This script works by finding out the number of days separating
         //the current date and the next target week day.
         $next_week = getDate(mktime(0, 0, 0, $month, $day + $days_left, $year));
         
         $next_week_html = $next_week["month"] . " " . $next_week["mday"] . " , " . $next_week["year"];
                                              
         return($next_week_html);
         }
?>

