PDA

View Full Version : Basic PHP Help Needed


Mr L
08-24-2002, 11:28 PM
Hi,

I hope that this is the right area to post this, and I apoligise for my rather basic knowledge here with PHP.

I am looking to add an icon next to a users name and was helped previously by somebody on these forums. I want to enhance this.

This is currently working fine. I call the icon from a template and it works perfectly.

Currently I have...


if ($post['usergroupid'] == 5 or $post['usergroupid'] == 6 or $post['usergroupid'] == 7) {
$post['userimage'] = '<img src="{imagesfolder}/moderator.gif" alt="Forum Moderator">';
} else {
$post['userimage'] = '';
}

...what I'd like to achieve is underneath this code, to specify that certain users by their ID numbers has their own pre-loaded icons. I have tried and tried and am unable to make this work.

Any assistance, would be grately appricated.

Harvey.

g-force2k2
08-25-2002, 10:10 PM
if you want to define certain usergroups seperately instead under that just use userid instead of usergroupid...

ie:

if($post[userid] == 1) {
$post[userimage] = "<img src=\" [ url here ]\" border=\"0\">";
}

and you just keep defining seperate userids ;) regards...

g-force2k2