PHP show if datetime hasn't passed


i trying have region stay visible until deadline has passed, , have code, it's not working!

 

if (strtotime($row_wadatbl_vacanciesposted['fld_vlockdate']) <= mktime(0,0,0)){

 

i've tried:

 

if (strtotime($row_wadatbl_vacanciesposted['fld_vlockdate']) <= $curdate['now()']){

 

in both instances, if use <= region disappears regardless of time , date having expired or not, if use >= display regardless of date , time.

 

what doing wrong here?

 

thanks in advance... again!

try this. edit based on requirement.

<?php if (time() <= strtotime('may 1, 2013')) { ?>
<div>this content show until may 1st 2013</div>
<?php } ?>



More discussions in Develop server-side applications in Dreamweaver


adobe

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support