PDA

View Full Version : Display different image each hour of the day (based on server time)



yrrot
12-08-2006, 09:51 PM
Hi All,
I'm looking for a script that will function for a radio station website. I'd like it to be able to display a specific image during specific times of day. The times need to be based on server time, not the viewer's PC clock. I've found scripts that come close to what i'm looking for, but they either only display text OR they are based on the viewer's PC clock instead of server time.

Example:
From 8am - 12 Noon, display the title of the show AND the host's picture.

From 12 Noon - 3:30pm, display the title of the next show AND the host's picture.

...and so on.


The schedule will likely be the same Monday thru Friday, but Saturday and Sunday will have a different schedule.


Any help would be appreciated! :D

djr33
12-09-2006, 12:09 AM
This would best be done with PHP, or another server side code, so it can get info from a database, or at the very least, get the server's time. Javascript wouldn't be able to do as much and would be less compatible.

yrrot
12-09-2006, 01:30 AM
Hi djr33. I'm hoping for a PHP solution as well. Have you ever seen anything similar to what I'm asking for?

djr33
12-09-2006, 02:46 AM
Really, isn't all that complex.

Here's the code--

<?php
$h = date('G'); //set variable $h to the hour of the day
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.

if ($h < 7) $img = 'fish.jpg';
else if ($h < 20) $img = 'frogs.jpg';
else $img = 'potatoes.jpg';

//if it's before 7am, use fish image
//if not and it's before 8pm, use frogs
//otherwise, potatoes
?>

The html for the page goes here...
<html>
...
<body>
...
<img src="<?php echo $img; ?>">
...
</html>

Very simple example, but that's the idea behind it. Depends how complex your setup if and what you want to do with it. Easy with php.


Using a database for this if you want to store all of the different things in there is a good idea, so just look into how PHP works with MySQL. Note that you need both installed on your server.
Here's a good tutorial to get you started--
http://php-mysql-tutorial.com

yrrot
12-10-2006, 02:50 PM
Thanks! For some of the "if" statments, I'd like to add a check to see what the day of the week is as well. Is my modification below correct?


<?php
$h = date('G'); //set variable $h to the hour of the day
$d = date('w'); //set variable $d to the day of the week.
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.

if ($h < 7) && ($d == 0) $img = 'fish.jpg';
else if ($h < 20) && ($d == 0) $img = 'frogs.jpg';
else $img = 'potatoes.jpg';

//if it's before 7am on Sunday, use fish image
//if not and it's before 8pm on Sunday, use frogs
//otherwise, potatoes
?>

The html for the page goes here...
<html>
...
<body>
...
<img src="<?php echo $img; ?>">
...
</html>


Thanks again!

thetestingsite
12-10-2006, 03:02 PM
It works after you change a few items. The errors are in red on the first code, and the second you will see the corrections.

original:



<?php
$h = date('G'); //set variable $h to the hour of the day
$d = date('w'); //set variable $d to the day of the week.
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.

if ($h < 7) && ($d == 0) $img = 'fish.jpg';
else if ($h < 20) && ($d == 0) $img = 'frogs.jpg';
else $img = 'potatoes.jpg';

//if it's before 7am on Sunday, use fish image
//if not and it's before 8pm on Sunday, use frogs
//otherwise, potatoes
?>

The html for the page goes here...
<html>
...
<body>
...
<img src="<?php echo $img; ?>">
...
</html>


corrected:



<?php
$h = date('G'); //set variable $h to the hour of the day
$d = date('w'); //set variable $d to the day of the week.
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.

if ($h < 7 && $d == 0) $img = 'fish.jpg';
else if ($h < 20 && $d == 0) $img = 'frogs.jpg';
else $img = 'potatoes.jpg';

//if it's before 7am on Sunday, use fish image
//if not and it's before 8pm on Sunday, use frogs
//otherwise, potatoes
?>

The html for the page goes here...
<html>
...
<body>
...
<img src="<?php echo $img; ?>">
...
</html>


The corrections I have done were to take out the extra parenthesis "( )" (not sure on spelling). In the if - else statements you only need an opening and closing set, nothing between the && (and) or || (or). Other than that, it works. I have tested it on my home server and was able to change the times and whatnot and it works as expected.

Let me know if you need any more help.

yrrot
12-10-2006, 04:14 PM
Thanks! I'll test it out on my server and let you know if I have any trouble.

djr33
12-11-2006, 03:40 AM
Glad it's working.

The info for date() is here-- http://www.php.net/manual/en/function.date.php but it looks like you've found it, considering you added the day of the week line.

yrrot
12-17-2006, 01:57 PM
Hi Everyone,
Thanks for all your help on this one. I succesfully got this working on the new site I'm creating. I needed to display a different image for each radio host at different points throughout the day, each day of the week. I also had to include a 2 hour offset from the server's time to match my time zone. Here's what my final code looks like.

Hopfully this is helpfule to others looking to do the same thing.

Regards,
Torry



<?php
$h = date('G'); //set variable $h to the hour of the day
$d = date('w'); //set variable $d to the day of the week.
$year = date('Y'); //set variable $year to the current year
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.
// Adjust 2 hour offset for MST below.
$h = $h-2;

// MONDAY SCHEDULE
if ($d == 1 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 1 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 1 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 1 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 1 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 1 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 1 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 2 && $h < 0) $img = 'img/hosts/danic.jpg';

// TUESDAY SCHEDULE
if ($d == 2 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 2 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 2 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 2 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 2 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 2 && $h >= 15 && $h < 17) $img = 'img/hosts/lizzy.jpg';
else if ($d == 2 && $h >= 17 && $h < 20) $img = 'img/hosts/westmar.jpg';
else if ($d == 2 && $h >= 20) $img = 'img/hosts/danic.jpg';
else if ($d == 3 && $h < 0) $img = 'img/hosts/danic.jpg';

// WEDNESDAY SCHEDULE
if ($d == 3 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 3 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 3 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 3 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 3 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 3 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 3 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 4 && $h < 0) $img = 'img/hosts/danic.jpg';

// THURSDAY SCHEDULE
if ($d == 4 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 4 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 4 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 4 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 4 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 4 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 4 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 5 && $h < 0) $img = 'img/hosts/danic.jpg';

// FRIDAY SCHEDULE
if ($d == 5 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 5 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 5 && $h >= 8 && $h < 10) $img = 'img/hosts/shonw.jpg';
else if ($d == 5 && $h >= 10 && $h < 12) $img = 'img/hosts/patm.jpg';
else if ($d == 5 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 5 && $h >= 13 && $h < 15) $img = 'img/hosts/edp.jpg';
else if ($d == 5 && $h >= 15 && $h < 18) $img = 'img/hosts/lizzy.jpg';
else if ($d == 5 && $h >= 18 && $h < 20) $img = 'img/hosts/jeremyb.jpg';
else if ($d == 5 && $h >= 20 && $h < 22) $img = 'img/hosts/exfyl.jpg';
else if ($d == 5 && $h >= 22) $img = 'img/hosts/stickyb.jpg';
else if ($d == 6 && $h < 0) $img = 'img/hosts/stickyb.jpg';

// SATURDAY SCHEDULE
else if ($d == 6 && $h >= 0 && $h < 4) $img = 'img/hosts/techtronic.jpg';
else if ($d == 6 && $h >= 4 && $h < 5) $img = 'img/hosts/pmw.jpg';
else if ($d == 6 && $h >= 5 && $h < 8) $img = 'img/hosts/geoffh.jpg';
else if ($d == 6 && $h >= 8 && $h < 9) $img = 'img/hosts/tomf.jpg';
else if ($d == 6 && $h >= 9 && $h < 10) $img = 'img/hosts/jimmyj.jpg';
else if ($d == 6 && $h >= 10 && $h < 11) $img = 'img/hosts/jasonr.jpg';
else if ($d == 6 && $h >= 11 && $h < 12) $img = 'img/hosts/hollyk.jpg';
else if ($d == 6 && $h >= 12 && $h < 13) $img = 'img/hosts/tomt.jpg';
else if ($d == 6 && $h >= 13 && $h < 14) $img = 'img/hosts/seanf.jpg';
else if ($d == 6 && $h >= 14 && $h < 15) $img = 'img/hosts/nutmeg.jpg';
else if ($d == 6 && $h >= 15 && $h < 17) $img = 'img/hosts/aaron_jenny.jpg';
else if ($d == 6 && $h >= 17 && $h < 19) $img = 'img/hosts/rayg_adrians.jpg';
else if ($d == 6 && $h >= 19 && $h < 22) $img = 'img/hosts/mattb.jpg';
else if ($d == 6 && $h >= 22) $img = 'img/hosts/hairballj.jpg';
else if ($d == 0 && $h < 0) $img = 'img/hosts/hairballj.jpg';

// SATURDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h < 2) $img = 'img/hosts/darrelm.jpg';
else if ($d == 0 && $h >= 2 && $h < 4) $img = 'img/hosts/techtronic.jpg';
else if ($d == 0 && $h >= 4 && $h < 5) $img = 'img/hosts/bigjon.jpg';
else if ($d == 0 && $h >= 5 && $h < 6) $img = 'img/hosts/joebear.jpg';
else if ($d == 0 && $h >= 6 && $h < 8) $img = 'img/hosts/russh.jpg';
else if ($d == 0 && $h >= 8 && $h < 9) $img = 'img/hosts/ronk.jpg';
else if ($d == 0 && $h >= 9 && $h < 10) $img = 'img/hosts/rockpoint.jpg';
else if ($d == 0 && $h >= 10 && $h < 11) $img = 'img/hosts/churchatqc.jpg';
else if ($d == 0 && $h >= 11 && $h < 12) $img = 'img/hosts/desertcf.jpg';
else if ($d == 0 && $h >= 12 && $h < 16) $img = 'img/hosts/kristenm.jpg';
else if ($d == 0 && $h >= 16 && $h < 17) $img = 'img/hosts/cdogg.jpg';
else if ($d == 0 && $h >= 17 && $h < 18) $img = 'img/hosts/snarf_daff.jpg';
else if ($d == 0 && $h >= 18 && $h < 19) $img = 'img/hosts/sonicsociety.jpg';
else if ($d == 0 && $h >= 19 && $h < 21) $img = 'img/hosts/jscott.jpg';
else if ($d == 0 && $h >= 21) $img = 'img/hosts/ghostlytalk.jpg';
else if ($d == 1 && $h < 0) $img = 'img/hosts/ghostlytalk.jpg';
?>

thetestingsite
12-17-2006, 03:18 PM
Glad to here that it is working for you. Also, thanks for posting the above code, I'm sure it may come in handy for some of the visitors to these forums.

Gibzon
08-06-2008, 03:19 PM
Hi there, im using this php script and i want to add minutes on the script but i have a problem when the radio programs last more than an hour the script just doesnt show anything after that minute comes.


<?php
$hora = date('G'); // Horas de 0 a 23
$dia = date('w'); // Dias 0 (Domingo) a 6 (Sabado)
$minuto = date('i'); // Minutos de 00 a 59

$hora = $hora+1;
$minuto = $minuto+21;

// MARTES
if ($dia == 2 && $hora >= 0 && $hora < 4) $img = 'images/yaco.gif';
else if ($dia == 2 && $hora >= 4 && $hora < 8) $img = 'images/nancy.gif';
else if ($dia == 2 && $hora >= 8 && $hora < 12) $img = 'images/lucas.gif';
else if ($dia == 2 && $hora >= 12 && $hora < 13) $img = 'images/juan.gif';
else if ($dia == 2 && $hora >= 13 && $hora < 15) $img = 'images/henoch.gif';
else if ($dia == 2 && $hora >= 15 && $hora < 17) $img = 'images/gustavo.gif';
else if ($dia == 2 && $hora >= 17 && $hora <= 21 && $minuto <= 44) $img = 'images/edmundo.gif';
?>

<html>
<head></head>
<body>

Estas escuchando a...

<br><br>

<img src="<?php echo $img; ?>">

</body>
</html>

can you guys help me please? thanks in advance!

jacksoncn
07-09-2011, 06:39 PM
Hi,

This post is old but...

I just came across this script and it's almost exactly what I need, but I'm also interested in adding minutes as my schedule changes on the mid point of some hours.

If anyone can help, I would appreciate it greatly. I would even pay you a bit for you time.

Thanks.

organza
09-29-2011, 05:06 AM
would it be possible for this code to be made in to html or css? if so would someone please help me to do it as I dont know how.

djr33
09-29-2011, 06:00 AM
HTML and CSS don't allow for conditional ("if") statements. No. You need Javascript, or a serverside programming language like PHP, ASP, CGI, etc.
(Of course any of those can be combined with HTML and CSS as needed to create the desired look.)

organza
09-29-2011, 06:09 AM
Hello thanks for your reply,

the problem I have is I can not upload PHP to my host, but JS etc I can, would it be possible for you to help me make this into a JS code by any chance?

djr33
09-29-2011, 08:37 PM
I should clarify something: you can do this in Javascript, but you cannot base it on server time. It will be based on the user's time on their computer (even if it is wrong or in a different location). You might be able to use Javascript to make it relative to the right timezone (adjust based on the current timezone) if that information is available. I'm not sure.

But if you google "change image every hour javascript" you will find some information. Please do a search first.

If your specific question is about the server time, then, no, you must have a serverside language like PHP available. You can do everything else in Javascript, but not the server time.

djbennybadger
01-03-2013, 11:02 PM
Hi Everyone,
Thanks for all your help on this one. I succesfully got this working on the new site I'm creating. I needed to display a different image for each radio host at different points throughout the day, each day of the week. I also had to include a 2 hour offset from the server's time to match my time zone. Here's what my final code looks like.

Hopfully this is helpfule to others looking to do the same thing.

Regards,
Torry



<?php
$h = date('G'); //set variable $h to the hour of the day
$d = date('w'); //set variable $d to the day of the week.
$year = date('Y'); //set variable $year to the current year
//G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.
// Adjust 2 hour offset for MST below.
$h = $h-2;

// MONDAY SCHEDULE
if ($d == 1 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 1 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 1 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 1 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 1 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 1 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 1 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 2 && $h < 0) $img = 'img/hosts/danic.jpg';

// TUESDAY SCHEDULE
if ($d == 2 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 2 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 2 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 2 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 2 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 2 && $h >= 15 && $h < 17) $img = 'img/hosts/lizzy.jpg';
else if ($d == 2 && $h >= 17 && $h < 20) $img = 'img/hosts/westmar.jpg';
else if ($d == 2 && $h >= 20) $img = 'img/hosts/danic.jpg';
else if ($d == 3 && $h < 0) $img = 'img/hosts/danic.jpg';

// WEDNESDAY SCHEDULE
if ($d == 3 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 3 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 3 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 3 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 3 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 3 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 3 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 4 && $h < 0) $img = 'img/hosts/danic.jpg';

// THURSDAY SCHEDULE
if ($d == 4 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 4 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 4 && $h >= 8 && $h < 12) $img = 'img/hosts/shonw.jpg';
else if ($d == 4 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 4 && $h >= 13 && $h < 15) $img = 'img/hosts/mikef.jpg';
else if ($d == 4 && $h >= 15 && $h < 19) $img = 'img/hosts/lizzy.jpg';
else if ($d == 4 && $h >= 19) $img = 'img/hosts/danic.jpg';
else if ($d == 5 && $h < 0) $img = 'img/hosts/danic.jpg';

// FRIDAY SCHEDULE
if ($d == 5 && $h >= 0 && $h < 4) $img = 'img/hosts/petem.jpg';
else if ($d == 5 && $h >= 4 && $h < 8) $img = 'img/hosts/angelaa.jpg';
else if ($d == 5 && $h >= 8 && $h < 10) $img = 'img/hosts/shonw.jpg';
else if ($d == 5 && $h >= 10 && $h < 12) $img = 'img/hosts/patm.jpg';
else if ($d == 5 && $h >= 12 && $h < 13) $img = 'img/hosts/pottsie.jpg';
else if ($d == 5 && $h >= 13 && $h < 15) $img = 'img/hosts/edp.jpg';
else if ($d == 5 && $h >= 15 && $h < 18) $img = 'img/hosts/lizzy.jpg';
else if ($d == 5 && $h >= 18 && $h < 20) $img = 'img/hosts/jeremyb.jpg';
else if ($d == 5 && $h >= 20 && $h < 22) $img = 'img/hosts/exfyl.jpg';
else if ($d == 5 && $h >= 22) $img = 'img/hosts/stickyb.jpg';
else if ($d == 6 && $h < 0) $img = 'img/hosts/stickyb.jpg';

// SATURDAY SCHEDULE
else if ($d == 6 && $h >= 0 && $h < 4) $img = 'img/hosts/techtronic.jpg';
else if ($d == 6 && $h >= 4 && $h < 5) $img = 'img/hosts/pmw.jpg';
else if ($d == 6 && $h >= 5 && $h < 8) $img = 'img/hosts/geoffh.jpg';
else if ($d == 6 && $h >= 8 && $h < 9) $img = 'img/hosts/tomf.jpg';
else if ($d == 6 && $h >= 9 && $h < 10) $img = 'img/hosts/jimmyj.jpg';
else if ($d == 6 && $h >= 10 && $h < 11) $img = 'img/hosts/jasonr.jpg';
else if ($d == 6 && $h >= 11 && $h < 12) $img = 'img/hosts/hollyk.jpg';
else if ($d == 6 && $h >= 12 && $h < 13) $img = 'img/hosts/tomt.jpg';
else if ($d == 6 && $h >= 13 && $h < 14) $img = 'img/hosts/seanf.jpg';
else if ($d == 6 && $h >= 14 && $h < 15) $img = 'img/hosts/nutmeg.jpg';
else if ($d == 6 && $h >= 15 && $h < 17) $img = 'img/hosts/aaron_jenny.jpg';
else if ($d == 6 && $h >= 17 && $h < 19) $img = 'img/hosts/rayg_adrians.jpg';
else if ($d == 6 && $h >= 19 && $h < 22) $img = 'img/hosts/mattb.jpg';
else if ($d == 6 && $h >= 22) $img = 'img/hosts/hairballj.jpg';
else if ($d == 0 && $h < 0) $img = 'img/hosts/hairballj.jpg';

// SATURDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h < 2) $img = 'img/hosts/darrelm.jpg';
else if ($d == 0 && $h >= 2 && $h < 4) $img = 'img/hosts/techtronic.jpg';
else if ($d == 0 && $h >= 4 && $h < 5) $img = 'img/hosts/bigjon.jpg';
else if ($d == 0 && $h >= 5 && $h < 6) $img = 'img/hosts/joebear.jpg';
else if ($d == 0 && $h >= 6 && $h < 8) $img = 'img/hosts/russh.jpg';
else if ($d == 0 && $h >= 8 && $h < 9) $img = 'img/hosts/ronk.jpg';
else if ($d == 0 && $h >= 9 && $h < 10) $img = 'img/hosts/rockpoint.jpg';
else if ($d == 0 && $h >= 10 && $h < 11) $img = 'img/hosts/churchatqc.jpg';
else if ($d == 0 && $h >= 11 && $h < 12) $img = 'img/hosts/desertcf.jpg';
else if ($d == 0 && $h >= 12 && $h < 16) $img = 'img/hosts/kristenm.jpg';
else if ($d == 0 && $h >= 16 && $h < 17) $img = 'img/hosts/cdogg.jpg';
else if ($d == 0 && $h >= 17 && $h < 18) $img = 'img/hosts/snarf_daff.jpg';
else if ($d == 0 && $h >= 18 && $h < 19) $img = 'img/hosts/sonicsociety.jpg';
else if ($d == 0 && $h >= 19 && $h < 21) $img = 'img/hosts/jscott.jpg';
else if ($d == 0 && $h >= 21) $img = 'img/hosts/ghostlytalk.jpg';
else if ($d == 1 && $h < 0) $img = 'img/hosts/ghostlytalk.jpg';
?>



this covers what i would like it to do but im stuck on how to make it more dynamic?
id like it to run via mysql so that a form to edit all its details is possible on another page..
so i can select what dj at what time is playing.. or add another dj to the schedule:confused:

can any one please help?

Beverleyh
01-03-2013, 11:59 PM
Do you have much experience with php/MySQL?

If you have the basis for your HTML form, and have some experience with php/MySQL then this might be something that somebody here can guide you on.

However, if you have no experience and require somebody to code this for you as a custom application, it will probably need to be taken to the paid work requests forum : http://www.dynamicdrive.com/forums/forumdisplay.php?30-General-Paid-Work-Requests