01-23-04 10:23 PM
Not really the right group for this but you can do it this way...
<?php
$dt= getdate();
echo '<img border="0" src=';
if ( $dt['hours'] >= 7 && $dt['hours'] <= 19 )
echo '"images/dayimage.jpg"';
else
echo '"images/nightimage.jpg"';
echo ' width="64" height="64">'
?>
HTH
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
"Eric" <ericlangland@hotmail.com> wrote in message
news:5372437.0401222214.492ef8ec@posting.google.com...quote:
> Hello,
> I'm a php moron....I need some php code that detects what time it is
> and displayes an one of two images based on time.
>
> I'd like one picture to be displayed between the hours of 7:00AM and
> 7:00 PM and one image to display during the other off hours.
>
> Any ideas...I've been messing wiht php and I can't even get a date
> generated..
>
> thanks
>
> ericlangland@hotmail.com
[ Post a follow-up to this message ]
|