userList = function userList()
{
$('#users_list2').load('user_list.php');
}
<?php
//user_list.php
include "includes/connectDb.php";
//GRAB DB DATA
$sql = "SELECT display_name,is_logged FROM members WHERE is_logged = '1'";
$result = mysql_query($sql);
//$num = mysql_num_rows($result);
while($row = mysql_fetch_assoc($result))
{
echo $row['display_name'] . "<br/>" ;
}
?>
This block of code should be run when an anchor link on the page is clicked, it does run, but after working properly twice or three times it stops working and leaves the "#users_list2" container empty even after a refresh of the page. Any help or advice on a workaround or a better way to do this would be much appreciated. The real purpose of this is just to generate a list with all the currently logged in member names from the database and load them into a div.

New Topic/Question
Reply



MultiQuote




|