Oneline & Offline Images instead of "Words"
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
Oneline & Offline Images instead of "Words"
Hi jay ...... I was wondering is it possible or where in the script I can go to add an image link for Online and offline? I looked in the "includes.php" i saw the online but not the offline I was able to add an image online link and it worked but could not find offline.
here an example of what I'm trying to do. http://www.musictodance.com/rtb/Online_Offline3.php instead of the "online" with words I'd like to have it as an image online and offline. What do you think
Thanx in advance
God Bless.
here an example of what I'm trying to do. http://www.musictodance.com/rtb/Online_Offline3.php instead of the "online" with words I'd like to have it as an image online and offline. What do you think
Thanx in advance
God Bless.
- Jay
- Will work for food (Administrator)
- Posts: 3020
- Joined: Mon Jan 14, 2002 12:48 am
- Location: Next Door
- Contact:
should be simple to do just do a conditional in php
Modify that as needed but it just needs a conditional to do an image.
Code: Select all
<?php
if ($status[0]['status'] == "Online")
{
echo '<img src=online.gif>';
}
else
{
echo '<img src=offline.gif>';
}
?>
- Jay
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
Online & Offline Images
Thank you Jay . One more question Jay:?: do I add the code in the includes.php or create any mane.php file?. Once i finish with it, I will send you a link to see How I customize your script to what I wanted to do
Thank You.
Thank You.
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
online offline images
Thanx jay. Truly appreciate the help. but one more where do I add this code? is it on the includes.php, playing.php,config.php or catcher.php. I have a feeling you might say the playing.php page, if so , do I put it in top of the page? and where exactly do I add it. I promise not to bother you again and I will send you a link to see what I'm trying to do after i"m done with it.
Thank you very much.
Thank you very much.
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
online & offline images
Thank you for the help Jay. I worked on it for many hours, it still showed image offline. I think something is wrong with the code, cause from line 5 to 10 of the code is in black color except for line 8 after echo ' is in red. begining of the code is fine.
" ';
}
else
{
echo '<img src=offline.gif>';
}
?>
And <img src=offline.gif>
here is an example of it http://www.musictodance.com/rtb/Online_Offline2.php
What do you think?
Thanx in advance.
" ';
}
else
{
echo '<img src=offline.gif>';
}
?>
And <img src=offline.gif>
here is an example of it http://www.musictodance.com/rtb/Online_Offline2.php
What do you think?
Thanx in advance.
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact:
Forgive me Jay, I forgot to add the phps link here. Here it is http://www.musictodance.com/rtb/Online_Offline2.phps
- Jay
- Will work for food (Administrator)
- Posts: 3020
- Joined: Mon Jan 14, 2002 12:48 am
- Location: Next Door
- Contact:
Your code looks fine,
Check your includes.php file to make sure you are using the right variable.
Also something else you could try is changing your conditional to the following:
That will ensure there isn't something funny about the status value that is messing things up.
Check your includes.php file to make sure you are using the right variable.
Also something else you could try is changing your conditional to the following:
Code: Select all
if (eregi("Online", $status[2]['status']))
{
echo "<img src=online.gif>";
....
- Jay
-
- Posts: 12
- Joined: Fri Sep 06, 2002 5:50 pm
- Location: Whitinsville,MA .USA
- Contact: