Thanks. Your suggestion works perfect.
I have another case. If the arrival date is more than 2 weeks old, the user should be redirected to another page, so I believe I have to use an if statement like this:
<?php if (date("d.m.Y H:i:s") > (date('d.m.Y H:i:s', strtotime($row_rsArrivals['arrivaldate']."+ 2 week")))) { ?>
<?php
header ( 'Location: redigering_stengt.php' ) ;
?>
<?php } ?>
But the user is not redirected, no syntax error in my if statement.
I'm attaching a file where I have put together an example. You can also see it on live URL here:
Untitled-2.php
Thanks
Regards
Rune