Well, firstly, notice that using php shorttags is a bad habbit.
Then you should take a note that the menu only shows if your "name" isn't set, so whenever $_COOKIE["name"] is set, you will get to the "ELSE" part of the main code.
Also notice that you should use the isset() code for all of your cookie "ifs" (else some servers might give a "Notice: Undefined index: COOKIEKEY in " every now and then)
I acctually believe that you want the menu to only show when they have the cookie set? In that case, this code should work (I changed the shorttags to normal tags when I did this small, well "fix")
PHP Code:
<?php
$_COOKIE["name"] = "YoDude";
if (
isset($_COOKIE["name"]) ||
isset($_COOKIE["primary_username"]) ||
isset($_COOKIE["primary_password"]) ||
isset($_COOKIE["secondary_username"]) ||
isset($_COOKIE["secondary_password"])) {
?>
<li class="menu_right"><a href="#" class="drop">
<?php
if (isset($_COOKIE["name"])) {
echo $_COOKIE['name'];
} else {
echo "You";
}
?>
</a>
<div class="dropdown_1column align_right">
<div class="col_1">
<ul class="simple">
<li><a href="#">FreelanceSwitch</a></li>
<li><a href="#">Creattica</a></li>
<li><a href="#">WorkAwesome</a></li>
<li><a href="#">Mac Apps</a></li>
<li><a href="#">Web Apps</a></li>
<li><a href="#">NetTuts</a></li>
<li><a href="#">VectorTuts</a></li>
<li><a href="#">PsdTuts</a></li>
<li><a href="#">PhotoTuts</a></li>
<li><a href="#">ActiveTuts</a></li>
<li><a href="#">Design</a></li>
<li><a href="#">Logo</a></li>
<li><a href="#">Flash</a></li>
<li><a href="#">Illustration</a></li>
<li><a href="#">More...</a></li>
</ul>
</div>
</div>
</li>
<?php } else { ?>
<li class="menu_right"><a href="http://x.<?php echo $base; ?>/search/search.php" class="drop">Log in</a>
<div class="dropdown_2columns align_right">
<div class="col1_2">
<div class="col_1">
<p><b>Name:</b></p>
</div>
<div class="col_1">
<input class="v2" name="name" placeholder="John Davis" style="width:98%" type="text" value=""/>
</div>
</div>
</li>
<?php } ?>
But The way you made the code, eighter you'll never need to use the "ELSE -> 'YOU'" or "IF ->'name'", deepending if you use isset() or !isset() on the $_COOKIE["name"]