Adobe Dreamweaver 0
Adobe Muse 0
ASP.net 0
.htaccess 6
CSS 5
Perl 0
PHP 57
PHP - User System 79
HTML 11
Java 0
Javascript 13
Ruby on Rails 0
General Web Development 4
Operating Systems
Video & Audio Editing
Adobe After Effect 0
Adobe Audition 0
Adobe Premiere 0
Final Cut 0
FruityLoops 0
iMovie 0
Windows Movie Maker 0
App Development
Hardware
Miscellaneous
<?php
session_start();
include"config.php";
$users = mysql_query("SELECT * FROM `members` WHERE `online`='1'");
while($online = mysql_fetch_array($users))
{
echo $online['username'] . " " . $online['ID'];
echo "<br />";
}
?>
A quick trip to W3SCHOOLS don't hurt anyone
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/HighRize/main/whosonline.php on line 126
Im not sure how the bbcode on this comment system goes so i can only type the stuff out so here this goes in the login.php as stated in the tutorial:
$online = mysql_query("UPDATE `members` SET`online` = '1' WHERE `username` = '$username'");
This goes in the logout.php as shown above:
$offline = mysql_query("UPDATE `members` SET `online` = '0' WHERE `username` = '$logged[username]'");
And this is just a small add-on to where is shows whos online i linked it to the profile.
<?php
include("config.php");
$sql = mysql_query("SELECT * from members where online = '1'");
while ($online = mysql_fetch_array($sql))
{
$username = $online[username];
echo ("<a href='members.php?user=$username'>$username</a> ");
//displays the online users
}
?>
Still only a blank page.
Thanks
Help?