The date worked in a different version of the script - this is the original:
<?PHP
//connect to mysql
//change user and password to your mySQL name and password
mysql_connect("localhost","root","PASSWORD");
//select which database you want to edit
mysql_select_db("events");
// Select only results for today and future
$result = mysql_query("SELECT * FROM `eventup1` WHERE `expiration` >=NOW() ORDER BY `airdate` ASC LIMIT 20 OFFSET 10");
while($r = mysql_fetch_array($result)) {
$event = $r["event"];
$venue = $r["venue"];
$eventdate = strtotime($r['eventdate']);
$expiration = strtotime($r['expiration']);
$eventactive = $r["eventactive"];
$setreminder = $r["setreminder"];
$now = time();
if(date('Y-m-d') == date('Y-m-d', $airdate)) {
// Same date, show only time
$dateFormat = 'g:ia';
} elseif(date('Y') == date('Y', $airdate)) {
// Same year, show date without year
$dateFormat = 'F jS - g:ia';
} else {
// Other cases, show full date
$dateFormat = 'F jS, Y - g:ia';
}
$eventdate = date($dateFormat, $airdate);
echo "<tr><td><b>$event</b></td><td>showing on $venue</td>";
echo "<td>$eventdate</td><td>$eventactive</td><td>$setreminder</td></tr>";
}
?>
Don't know why I get the error in the PmcPagination script but not this one... anyone know why?
How could I get the above script to paginate, in the style of this URL:
http://library.digiguide.com/lib/programmenextshowing/Police%2C+Camera%2C+Action!-12578
(notice how the pagination is below the footer).
This is my basic page coding:
<?php
include("header.php");
include("eventschedule.php");
include("event-footer1.php");
include("footer.php");
?>
(eventschedule.php is the code submitted above. It works with records limited, but I can't paginate them properly!)
Thank you for your help above, if anyone knows how to fix this, I'll add reputation when I can!