Jump to content

Recommended Posts

I was told that there was a way to make a memberlist by including the members table from my database. Is that true? Or do I need to make a table that I physically need to update whenever someone joins?

 

If I include the database table, how would I hide users' passwords?

Link to comment
https://forums.phpfreaks.com/topic/163406-memberlist/
Share on other sites

I was told that there was a way to make a memberlist by including the members table from my database. Is that true? Or do I need to make a table that I physically need to update whenever someone joins?

 

You should already be storing users in a table.

 

If I include the database table, how would I hide users' passwords?

 

Don't include it in your query.  You just have to query the tables and fields that you want to display in the memberlist feature.

Link to comment
https://forums.phpfreaks.com/topic/163406-memberlist/#findComment-862153
Share on other sites

Well I am storing them in a table on the database, but I wanted to show that table on a regular page as a memberlist (without the passwords).

 

You need to create a select statement from the table(s) that your member information is on and iterate through the results.  Google, "mysql php select".

Link to comment
https://forums.phpfreaks.com/topic/163406-memberlist/#findComment-862218
Share on other sites

Just do something like this:

<?
print "<title>Members</title>";
print "<link rel='stylesheet' href='style.css' type='text/css'>";
print "<div class='divider'><table class='divider'>

<strong>Members</strong>";
print "<tr class='headline'><td width=60%>Name</td><td>Other</td></tr>";

$members="SELECT * from users";

$members2=mysql_query($members) or die("Could not get members");

while($members3=mysql_fetch_array($members2))

{
$members3[username]=strip_tags($members3[username]);


print "<tr class='mainrow'><td><a href='index.php?case=profile&username=$members3[username]'>$members3[username]</a><br />";

if($members3[avatar]){
print "<img src='$members3[avatar]' height='110' width='110' /><br />";
}

print "</td>";

print "<td>Other stuff could go here</td>";

}
print "</tr></table></div>";
?>

Link to comment
https://forums.phpfreaks.com/topic/163406-memberlist/#findComment-862284
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.