zMagenta
Posting Freak
- Jul 15, 2011
- 1,414
- 682
Hello!
Been working on a CMS recently. This is for Habbo, but it's nothing to do with Habbo directly. (If that makes sense?)
What I would like is it to show an image if the user is online, and a different one if the user is offline. It's defined where a user is offline/online in the 'users' table, via the column 'online' (1 = yes, 0 = no).
I started this;
Then <img src="{url}/app/tpl/skins/{skin}/images/offline1.gif?1"/> this is what needs to be shown when you're offline ('0') but when online I need it to show
<img src="{url}/app/tpl/skins/{skin}/images/online1.gif?1"/>
If you understand this, it'll be a great help if someone can help me out here.
Been working on a CMS recently. This is for Habbo, but it's nothing to do with Habbo directly. (If that makes sense?)
What I would like is it to show an image if the user is online, and a different one if the user is offline. It's defined where a user is offline/online in the 'users' table, via the column 'online' (1 = yes, 0 = no).
I started this;
Code:
<?php
$getmain4 = mysql_query("SELECT online FROM users WHERE username = 'zMagenta'");
while($muslim5 = mysql_fetch_array($getmain4))
{
?>
Then <img src="{url}/app/tpl/skins/{skin}/images/offline1.gif?1"/> this is what needs to be shown when you're offline ('0') but when online I need it to show
<img src="{url}/app/tpl/skins/{skin}/images/online1.gif?1"/>
If you understand this, it'll be a great help if someone can help me out here.