ok - so i've got some entries with dates in my db. I thought i had it but its not quite there yet.
If today is 20061017 and i want to look 3 weeks into the future its not as simple as addings 21 days. How can i get the month to change automatically after it reaches the last day of the month?
$today= date("Ynd");
$daysahead=21;
$d = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
for($i=0;$i<$daysahead;$i++){
$sql = mysql_query("SELECT * FROM pbf_films WHERE pbf_dd='$today'");
$page ="EMPTY!";
while($myrow=mysql_fetch_array($sql)){
$pbf_title = $myrow["pbf_title"];
$pbf_id = $myrow["pbf_id"];
$pbf_filename = $myrow["pbf_filename"];
$pbf_dd = $myrow["pbf_dd"];
$f++;
$page ="<a href=\"http://www.jynk.net/picbox/images/$pbf_filename\" target=\"_blank\"><img src=\"../thumbs/th_$pbf_filename\" borders=\"0\" align=\"left\"></a>";
}
$tdb .="<div id='allimages' >
<span class='overimb'>($today)</span><br/>
$page</div>";
$today++;
$page ="";
}