I think you're misunderstanding the "concept" of the IF statement.
It sort of works like this,
- Whatever you specify inside IF(), is basically checked to see if it is true, such as:
if($name == 'Sharif')
You probably already know this (or you might not), but if you wanted to check if the variable $name was Sharif or not, and you want to display a certain message if it IS Sharif, you would do this:
if($name == 'Sharif') //If the name is Sharif
{
echo 'Eureka, it is you!';
}
else //Otherwise ..
{
echo 'Ew, who are you?';
}
Get it? Confused? http://us2.php.net/manual/en/control-structures.php (http://us2.php.net/manual/en/control-structures.php#control-structures.if). Hope I helped you.