Today in Music History
What happened today in music history:
‘. $fullmonth[$month].’ ‘.$day .’
‘;
$username = DB_USER;
$password = DB_PASSWORD;
$hostname = DB_HOST;
$dbname = DB_NAME;
$mysqli = new mysqli($hostname, $username, $password, $dbname);
if ( $mysqli->connect_errno )
{
    echo ‘Sorry, unable to get content.’;
}
else
{
    $sql = “SELECT year, data FROM todayinmusic WHERE month = “. intval($month) .” AND day = “. intval($day);
    $results = $mysqli->query($sql);
    while ($row = $results->fetch_assoc())
    {
        echo ‘‘.$row[‘year’].’: ‘.$row[‘data’].’
‘;
    }
    $results->free();
    $mysqli->close();
    $previousday= $day – 1;
    $nextday = $day + 1;
    $previousmonth = $month;
    $nextmonth = $month;
    if ($previousday == 0)
    {
        $previousmonth=$month-1;
        $previousday=$daysmonth[$month];
    }
    if ($nextday > $daysmonth[$month] )
    {
        $nextmonth=$month+1;
        $nextday=1;
    }
    if ($previousmonth==0)
    {
        $previousmonth=12;
        $previousday=31;
    }
    if ($nextmonth==13)
    {
        $nextmonth=1;
        $nextday=1;
    }
echo ‘
| <<< Previous day | Archives | Next day >>> | 
‘;
}
?>
