After doing some searching and research, I've been able to devlop a rudementary calendar app/db for rental availability. Now, what I am wondering is it possible to run a select statment to give me all of the days where a rental property is booked, and then have those days highligted on the calendar?
Right now, my code is just displaying the calendar, but I have the sql statment there that pulls the data, just trying to find a way to add the highlight and results into this code:
echo "
<table border='1'>
<tr align='center' border='0'>
<td align='center' colspan='7'>
<font size='3'>$This_Month $This_Year</font>
</td>
</tr>
<tr>
<td colspan='1' align='right'>
<tr>
<td width='$col_width' align='center'>
Sun
</td>
<td width='$col_width' align='center'>
Mon
</td>
<td width='$col_width' align='center'>
Tue
</td>
<td width='$col_width' align='center'>
Wed
</td>
<td width='$col_width' align='center'>
Thu
</td>
<td width='$col_width' align='center'>
Fri
</td>
<td width='$col_width' align='center'>
Sat
";
//Next, we draw the calendar body
$rowcount="1";
$daycount="1";
$calendar_day=0;
while ($rowcount<=$rows)
{
echo "<tr>";
$day_column=1;
while ($day_column<=7)
{
echo "<td>";
if ($daycount<$startpos)
echo " ";
elseif (($daycount-$startpos+1)>$days)
echo " ";
else
{
$calendar_day=$calendar_day+1;
echo "$calendar_day";
}
$daycount=$daycount+1;
echo "</td>";
$day_column=$day_column+1;
}
echo "</tr>";
$rowcount=$rowcount+1;
}
//Finally, we finish the table
echo "</table>";