Dear John: Thank you! That did get rid of the error. However, no matter what day you click on in the calendar, it just lists events for today's date. So I put this in dayview.php but it didn't help:
Code:
$today = date ('Y-m-d'); $daydate = date('l, F d, Y');
if(isset($_GET['startdate']) && is_numeric($_GET['startdate'])){
$getdate = $_GET['startdate'];
} else {
$getdate = $today;
}
$query = " SELECT `event_id`,`event_title`, date_format(`startdate`, '%M %D, %Y') as startdate, time_format(`starttime`, '%h:%i %p') as starttime, time_format(`endtime`, '%h:%i %p') as endtime
FROM `event`
WHERE `startdate` = '".$getdate."'
ORDER BY `starttime`, `event_title` ";
$result = @mysql_query($query,$connection) or die("Couldn't execute $query query."); ?>
<div class="h1">EVENTS for <?php echo $daydate; ?></div>
<p><? while($event = mysql_fetch_assoc($result)){ ?>
<div class="day">
<?php echo $event['starttime']; ?> - <?php echo $event['endtime']; ?> <a href="/php/event-detail.php?event_id=<?php echo $event['event_id'];?>"> <?=$event['event_title'];?></a><br>
</div>
<? } ?></p>
I tried to adapt Brady's code from last night for passing variables through the URL, but I'm not sure if it applies to date values (and I may have screwed it up). All I'm trying to do is link dayview.php to yearview.php based on what day you click on. Should be simple, but... Does your php extend that far? Thanks for your help.
Bookmarks