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

Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang

Help me with some material on Open Text Overview.
Hi Experts,
Please help me out with some material on Open Text. I have been supporting AP Workf

drop-down with sub-category appear
Hello,

i know how to build a simple dro-down list, im looking for a code when im gonna choose

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Save data in input fields when they press "BACK BUTTON"
Hi, this is html form: And let's say they get a error "Please enter ur title must be more then

onclick problem
I have <input type="text" name="message">
<a href=page2.

convert pps to wsf with php'how?
hi
i want to convert with php
PowerPoint file to swf file(flash)
how please?
thank!!!

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

Remove Rows From Database ad
Hi All,

I have this:

Code: [Select]<?php
session_start();
include('../com

Php Mysql Page Loading Notice
Hi all,

I was wondering if there is a way (Sure there is) of showing a message or an image wh

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