hey all.. i have this:
// get the info from the listbox
$m = "$_POST[themonth]";
$d = "$_POST[theday]";
$y = "$_POST[theyear]";
// do the hard stuff
$timestamp = strtotime("$m $d, $y");
$h = date('F d, Y', strtotime("$days days", $timestamp));
it calculates a future date based on user input. now i want to make it slightly advanced by having the future date displayed on a calender.
now ive discovered the phpCal class and it seems to be just what i need. but, im having a few problems.
require("phpCal.php");
if ($_GET["month"]){
$cal = new phpCal($_GET["month"], $_GET["year"]);
} else {
$cal = new phpCal(date("m"), date("Y") ) ; ) ;
}
now this bit above makes the calender, when i combine the two to get this:
<?php
require("phpCal.php");
$timestamp = strtotime("$m $d, $y");
$h = date('F', strtotime("$days days", $timestamp));
$h1 = date('d', strtotime("$days days", $timestamp));
if ($_GET["themonth"]){
$cal = new phpCal($_GET["themonth"], $_GET["theyear"]);
} else {
$cal = new phpCal($h, $h1);
}
?>
it works, sort of. it makes the calender, and the calender is in the future, only its not the right month as calculated by the input from the form. can anybody help me get it to display the right month?