Jump to content

Calendars


pspwzrd

Recommended Posts

Does anyone know of any code(maybe javascript, but probably php)that checks the date, and if the number,e.g 29th,is correct,it changes the colour.this is for a calender system i am trying to make,the calender is on www.anticip8-ye.com it isnt finished yet, but can anyone help?thanks

Joe

p.s only 13,and a bit of a newbie,i know so stuff,but try and make it as simple a pos please! ;D

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

easiest thing to do is make a couple classes

<style>
.background1{
background-color: red;
}

.background2{
background-color: green;
}
</style>

 

Then like revraz said check the date and assign a style

if($date == $today){
$class = "background1";
} else {
$class = "background2";
}

 

Then put it in the html for the calendar

 

<sometag class=<? echo $class; ?>>

 

Ray

Link to comment
https://forums.phpfreaks.com/topic/94173-calendars/#findComment-482369
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.