The <ifcookie> and <ifnotcookie> tags
behave identically to the <if> and <ifnot>
tags, with the notable exception being that they derive the source of their logical evaluations from the cookies stored in
the browser for the domain being accessed by the web browser, rather than from stored variables.
Example 13-16 welcomes a user with a personalized message if they have a cookie stored
in their browser named username.
Example 13-16. Using ifcookie and ifnotcookie
<lxp>
<ifcookie username>
Welcome back, <putcookie name="username">.<br />
</ifcookie>
<ifnotcookie username>
<include src="login.php" />
</ifnotcookie>
</lxp>
In Example 13-16, if the username cookie doesn't
exist, the user will see a login screen provided by a PHP document. This document is rendered through an Apache sub-request
inclusion (see the Section called Including External Content Types
").