Associate
- Joined
- 21 May 2003
- Posts
- 1,008
hi. I've got a table with a field on it which users can change. however i don't want them to change it if the date in another field is less than 24 hours ahead. how would i do this?
<?php
if (($datestamp + 86400) < time()) {
//allow them to edit
} else {
//don't
}
?>
jamesrw said:if($date2 < 86400){
// dont let them change it
} else {
// ok
}
presuming the dates are store as timestamps
robmiller said:That would only let them edit it if the date were 1970-01-01.