Jump to content

Diary/Calendar


jenodonovan

Recommended Posts

Hi,

I have implemented a calender and it is back-ended with a database, i want meetings etc that are held within the database to show up on the correct date on the calender. I am completely stuck...but this is what i have got so far (impart from the creating the table bit), has anyone got any ideas on how to crack it?

 

$timestamp = mktime(0,0,0,$cMonth,1,$cYear);

$maxday = date("t",$timestamp);

$thismonth = getdate ($timestamp);

$startday = $thismonth['wday'];

 

for($i=0; $i<($maxday+$startday); $i++)

{

if(($i % 7) == 0) echo "<tr>\n";

if($i < $startday) echo "<td></td>\n";

else echo "<td align='center' valign='middle' height='20px'>". ($i - $startday + 1) . "</td>\n";

if(($i % 7) == 6 ) echo "</tr>\n";

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/96512-diarycalendar/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.