Well I really hope that nobody just posts their way of doing this. Let him figure it out. Let me give you some help.
The only thing that you will need to understand and read is about IF statements and how they work. Here is an example of one.
$var1 = 1;
$var2 = 1;
if($var1 == $var2)
{
// Code if they are equal.
// This would be true.
}else{
// Code if they are not equal.
}
if($var1 != $var2)
{
// Code if they are equal
}else{
// This is the case that would run in the example.
// var1 is NOT equal to var2
}
If you don't understand this then step back further into logic with symbols. That can be found in any PHP book. Usually covered within the first 2 chapters. Chapter 1 is usually installing and Chapter 2 started with logic. I am sorry but everyone here learns from their mistakes. If you post your code we can help you further. But we all get paid to code, I am not being a "hardass" here I am just trying to teach. Work out an example then come back with yoru code. Thanks,
Chad