Help with usergroups? prolly really quick


Posted on 16th Feb 2014 07:03 pm by admin

So were coding our own forums for a game system we made an we have the users level setup but now I need to make it do user groups. See the groups are defined by numbers:

0 - banned
1 - registered
Did you know?Explore Trending and Topic pages for more stories like this.
2 - donator
3 - mod
4 - admin
5 - owner

I have this setup to define ranks
$rankstring = "<b><font color='#336699'>";

$row=update_lastVisit($_SESSION["user"][0]);

$x = 1;

while ( $whosonline = mysql_fetch_array( $res ) ) {
if ( $x != 1 ) {
echo ", ";
}
echo "<a href="member.php?id=$whosonline[id]">$rankstring$whosonline[name]</b></font></a></strike>";
$x++;
}

I need to know how to make it MySql read the row for the level and if there in that group then make their name that color. Like for admins something like

if user level is 5 then $rankstring = "html code for admin color";
and have that set ONLY admins as that color and not the other groups. How would I do it like that? The row that the usergroups are read from is 5 if that helps. Can someone help quickly?
No comments posted yet

Your Answer:

Login to answer
340 Like 41 Dislike
Previous forums Next forums
Other forums

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Help Optimizing code
Good Morning,

I wrote a small import function for a website of mine and I know there has to b

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad

webpage with (simple) login & mysql-db
Hi all,

What I was looking for before was a multi-user password manager, web-based! The offer

check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.

The method delivers er_changed_data.

I need help on this PHP code
Hi everybody, I made some kind of mistake while editing the code below. As you see, at the 3 row my

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash