I have a PHP with a list of renewal dates. The date field is "datetime".
How would i assign a style class / id to a row that had a date within 30 days of today ?
For example
Mr John Doe 31-03-2016 Mr John Test 31-05-2016
The top row would have a class of "renew". Here is the its so far
<?php   
$query = mysql_query("SELECT * FROM homepolicynumber order by id desc") 
or die(mysql_error()); 
echo "<table border='0' width='100%' cellpadding='10'>"; 
echo "<tr height='25px' valign='center' class='head'> 
    <th width='20px'><p></p></th> 
    <th width='140px'><p>Policy Number</p></th> 
    <th width='300px'><p>Customer Name</p></th> 
    <th width='115px'><p>Policy</p></th> 
    <th width='115px'><p>Date</p></th> 
    </tr>"; 
while($row = mysql_fetch_array( $query )) { 
    echo "<tr height='25px' valign='center'>"; 
    echo '<td valign="middle"><p><a href="delete.php?id=' . $row['id'] . '"><img src="../../Images/Icons/table-delete.png"/></a></p></td>'; 
    echo '<td><p>' . $row['brand'] . '-' . $row['publication'] . '-R-' . $row['id'] . '</p></td>'; 
    echo '<td><p>' . $row['title'] . ' ' . $row['firstname'] . ' ' . $row['lastname'] . '</p></td>'; 
    echo '<td><p>Home</p></td>'; 
    echo '<td><p>' . $row['datetime'] . '</p></td>'; 
    echo "</tr>"; 
} 
// close table> 
echo "</table>"; 
echo "<br /><p><b>View All</b> | <a class='link' href='view-all.php?page=1'>View Paginated</a></p>"; 
?> 
 
     
     
    