Project / Support Center
Welcome, Guest. Please login or register. June 16, 2019, 05:33: AM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL/PHP  |  Topic: if then else after or before a specific date 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: if then else after or before a specific date  (Read 7534 times)
admin
Administrator
******
Offline Offline

Posts: 154


« Reply #1 on: February 01, 2017, 09:50: PM »

You can also do this based on the current date



<?php  //expired date start
if(strtotime($row_rsecho_listing['listing_renewal_date']) <= strtotime('now')) {
?>

Expired on <?php echo formatDate($row_rsecho_listing['listing_renewal_date']); ?>
 
<?php // else expired date
} else { ?>

Expires on <?php echo formatDate($row_rsecho_listing['listing_renewal_date']); ?>

<?php }
// end expired date end
?>
« Last Edit: February 01, 2017, 10:06: PM by admin » Report to moderator   Logged

The Unknown Webmaster
admin
Administrator
******
Offline Offline

Posts: 154


« on: December 21, 2015, 10:59: PM »

<?php
// Show IF Conditional region11
if (strtotime(@$row_rsclassphotos['submit_date']) <= strtotime('2015-12-21')) {
?>
show this
                                                                  
<?php
// else Conditional region11
} else { ?>
                                                                  
Else show this

  <?php }
// endif Conditional region11
?>

>= great than or equal to this date
<= less than or equal to this date
« Last Edit: December 21, 2015, 11:07: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL/PHP  |  Topic: if then else after or before a specific date « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!