Jump to content
MakeWebGames

[request] Userlist


bocco

Recommended Posts

i have created a mod, and now i am a little lost in making a user list for the mod

the mod is a special club that only members that are a 'x' level can get in and of course pay the entry free.

what i need is a user list of all the members that are in the club. Can anyone help me out please.

Oh the table is of course in users and is named clubakbuyin

Link to comment
Share on other sites

Re: [request] Userlist

Well, I think you'd have it so that when a user does join, it will enter their name in the new 'user list' table. Then have a query selecting all data from that table to show who's in the club. :)

$sql = $db->query("SELECT * FROM `tablename`")

<table width = '75%' celllspacing = '1' class = 'table' />

<tr />

<th />User Name</th>

<th />User Level</th>

</tr>";

 

Then to output it

while($r = $db->fetch_row($sql))

{

print "<tr />

<td />{$r['clubuserNAME']}</td>

<td />{$r['clubuserLEVEL']}</td>

</table>";

}

or something like that. :)

Link to comment
Share on other sites

Re: [request] Userlist

well here is the thing, i do not want others to know they are in there

the list would only be a link in the 'club'

just a little more info.

once you pay the fee to get in the club it sets 'clubakbuyin' to 1

so i would need the list to look for clubakbuyin >= 1

and if clubakbuyin = 1 then list username

Link to comment
Share on other sites

Re: [request] Userlist

Ohhh.

In which case, this is what you'd have:

 

$sql = $db->query("SELECT * FROM `users` WHERE `clubakbuyin` >= 1");

print "<table width = '75%' cellspacing = '1' class = 'table' />
<tr />
<th />User Name</th>
<th />Level</th>
</tr>";

while($r = $db->fetch_row($sql))
{
print "<tr />
<td />{$r['username']}<td>
<td />{$r['level']}</td>
</tr>
</table>";
}

 

or something on those lines.

I've sent you a message with my email. ;)

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...