PHP == Function

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
Hi,
So I'm coding something that selects VIP from a member (code below)
PHP:
                                                    if($users->user_DatabyID($user_id,"rank_vip") == 1)
                                                    {
                                                        echo "<option value='3'>Gold</option><option value='2'>Silver</option><option value='1'>Bronze</option><option value='0'>None</option>";
                                                    }
                                                        else
                                                    {
                                                        echo "<option value='0'>No</option><option value='1'>Bronze</option><option value='2'>Silver</option><option value='3'>Gold</option>";
                                                    }
I cannot figure out, how to make it equal a value of 0 to 3, right now the above code is only equal to 1. I have tried == < 4, as there is only 3 values to begin with, but that doesn't seem to work.

As of now, if a user is rank 2, they count as VIP but it displays "Gold" instead of the actual value, which would be 2, "Silver"

I'm trying to make it so if a user is 3, "Gold" will display, if they are 2, "Silver" will display, and so on. So basically, I'm trying to add multiple values into the statement, is this possible?
 

Users who are viewing this thread

Top