I'm looking for some help to automate this process.
Here's my full page of code. http://www.privatepaste.com/65bbd73d3b Sorry I used privatepaste, but it was too much code for me to format nicely by putting 4 lines infront of each (if there's a fast way to do this, let me know for my next SO question!)
Basically, if you look at line 53, I have this.
$checkdonors = mysql_query("SELECT userid FROM user WHERE membergroupids LIKE '%33'");
I'm trying to make it so it checks if the userid's membergroupids field contains 33, which it checks fine. However, I want to add it to an if condition, shown on line 77.
<td <?php if ($tuserid==$checkdonors) { ?> style="background-color:#D0F2CD;" <?php } elseif ($tids=='1' AND $toonid==$tid) { ?> style="background-color:#FFD2F9; <?php } ?>">
Because, on the next td, I have..
<td <?php if ($tuserid=='602' || $tuserid=='232' || $tuserid=='200' || $tuserid=='563' || $tuserid=='532') { ?>
Those 5 userid's (602,232,200,563,532) are the users I have in membergroupids 33, but I had to do it manually.
I'd like to automate the process, so I don't have to add a new $tuserid=='userid' every time a member is added to membergroupids '33'.
How can I do this?
Thank you so much.
602,232,200,563,532are those vips ? and they are the result ofSELECT userid FROM user WHERE membergroupids LIKE '%33'?