It works perfect. I love it.
Now, heres another question. If I have two IP addresses I want to make different colors, How would I do that?
For example I would want 123.333.33.3 to be red background, and I would like 127.0.0.1 to Be green background. The IPs are just a example. I will replace them with the correct ones when I get the code working.
THANKS SO MUCH!!!!!!!!
Help With Simple IF statement
Moderator: General Moderators
- nickman013
- Forum Regular
- Posts: 764
- Joined: Sun Aug 14, 2005 12:02 am
- Location: Long Island, New York
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
A simple if statement
Something along those lines.. I recommend you check for the existance of the ip address first though..
Code: Select all
echo '<tr';
if ($ip == '127.0.0.1') echo ' bgcolor=red';
elseif ($ip == '127.0.0.1') echo ' bgcolor=green';
echo '>';- nickman013
- Forum Regular
- Posts: 764
- Joined: Sun Aug 14, 2005 12:02 am
- Location: Long Island, New York