javascript - comparing two date and creating output -


i have 2 field named creation_date , expiry_date. want create row on table name status, if user has passed expiry date output must expired , if user haven't passed expiry date output must active

<th>     <div>         <?php echo get_phrase('status');?>     </div> </th>  <td>         <div class="badge badge-<?php if ($expiry_date < $creation_date) {     echo 'still active';     }     else      if ($expiration_date == $creation_date) {     echo 'still active';     }      else {     echo 'time expired';     };?>">     </div>     <?php echo $row['status'];?> </td> 

dont create such field incorrect unless run job update status field every few minutes.

make staus check dynamic doing data comparison mention whenever need know if status expired.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -