Hey guys
I have a php calendar on my site. What i would like is to connect to a mysql database and if the value of the ‘Day’ column matches the day number i want it to have a red background.
this is the code i have
<?php $timestamp = mktime(0,0,0,$cMonth,1,$cYear); $maxday = date("t",$timestamp); $thismonth = getdate ($timestamp); $startday = $thismonth['wday']; ob_start(); $con = mysql_connect("localhost","thebeach","4sSq99Jht0"); $day = mysql_query ("SELECT Day FROM calendar"); for ($i=0; $i<($maxday+$startday); $i++) { if(($i % 7) == 0 ) echo "This isnt working though could ayone help me out plz.
thanks