My calendar is online...
I made a form in a password protected area that allows users to select the Month.Day.Year, then list the events in a text box for that day then > that form submits into a MySQL database.
On my calendar page, I want it, so when a user hovers their mouse over a particular date, a window appears - like seen here http://www.4guysfromrolla.com/webtech/code/ContextSensitiveHelp.htm
Problem is, for each date it has to bring up a different window, because of course - the events will change from day-to-day
Im unsure how to incorporate this into my php calendar script. (So when a user hovers over a date: a window appears and displays the events for that day) The events will be retrieved from the database - I can handle all that - its just the hovering and making the window appear - here is my calendar script:
<html>
<!-- Creation date: 04/02/05 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>baaCalendar</title>
<meta name="Author" content="Barand">
<meta name="Generator" content="AceHTML 4 Pro">
<style type="text/css">
TD {font-family: arial; font-size: 9pt; text-align: center; height: 20}
TH {font-family: arial; font-size: 9pt; text-align: center; width: 20px; height: 20; font-weight: 600; color: #FFFFFF}
TH.wd {background: #99CC99}
TH.we {background: #999999}
TD.we {background: #EEEEEE; }
TD.wd {background: #EEFFEE}
TD.hd {background: #FFFFFF; color: #339900}
A.nul {text-decoration: none}
A:hover {background: #DDDDDD; color: #FF0000}
</style>
</head>
<body>
<?php
$currMonth = isset($_GET['month']) ? $_GET['month'] : date('n');
$currYear = isset($_GET['year']) ? $_GET['year'] : date('Y');
$today = (($currYear == date('Y')) && ($currMonth == date('n'))) ? date('j') : 0;
$prevMonth = $currMonth==1 ? 12 : $currMonth-1;
$nextMonth = $currMonth==12? 1 : $currMonth+1;
$prevYear = $currMonth==1 ? $currYear-1 : $currYear;
$nextYear = $currMonth==12? $currYear+1 : $currYear;
$day1 = mktime(0,0,0,$currMonth,1,$currYear);
$dim = date('t', $day1);
$dayN = mktime(0,0,0,$currMonth,$dim,$currYear);
$dow1 = (date('w',$day1)+6) % 7;
$dowN = (date('w',$dayN)+6) % 7;
$calHead = date('F Y',$day1);
echo <<<EOT
<table border="0" cellspacing="1" style="border: 1pt solid silver">
<tr>
<td class="hd"><a class="nul" href="$_SERVER[PHP_SELF]?year=$prevYear&month=$prevMonth"><<</a></td>
<td colspan="5" class="hd">$calHead</td>
<td class="hd"><a class="nul" href="$_SERVER[PHP_SELF]?year=$nextYear&month=$nextMonth">>></a></td>
</tr>
<tr>
<th class="wd">M</th>
<th class="wd">T</th>
<th class="wd">W</th>
<th class="wd">T</th>
<th class="wd">F</th>
<th class="we">S</th>
<th class="we">S</th>
</tr>
<tr>
EOT;
for ($d=0;$d<$dow1;$d++) echo "<td class=\"hd\"> </td>";
$c = $dow1;
for ($d=1; $d<=$dim; $d++, $c++) {
if ($c%7==0) echo "</tr><tr>";
$cl = ($c%7==5) || ($c%7==6) ? 'we' : 'wd';
$st = ($d == $today) ? "style='border: 1pt solid #FF0000'" : '';
echo "<td class=\"$cl\" $st>\n";
echo "$d" ;
echo "</td>\n";
}
while ($c++ % 7 != 0) echo '<td class=\"hd\"> </td>';
echo "</tr></table>\n";
?>
</body>
</html>
Any help would be great!