Let me document the code you gave:
<?
if(isset($username)){setcookie("username",$username,time()+129600);}
/
if the var $username is set, place a cookie named username
/
if(isset($COOKIE["username"])){$username=$COOKIE["username"];}
/
if a cookie var called username is set, a var username is now the value of that cookie
/
?>
Basically the either statement mirrors the other, one sets and one gets.
Originally you said you needed "if no user, then use admin".
OK, I assume by "user" you mean either the cookie "username" or the var "username".
With your reply it looks like you want to have a cookie or variable named "admin".
Here goes another try to answer the problem by adding on to your code...
<?
if(isset($username)){
setcookie("username",$username,time()+129600);
}else if(isset($admin)){
setcookie("admin",$admin,time()+129600);
}
/
if the var $username is set, place a cookie named username, if not do the same test for var $admin
/
if(isset($COOKIE["username"])){
$username=$COOKIE["username"];
}else if(isset($COOKIE["admin"])){
$admin=$COOKIE["admin"];
}
/
if a cookie var called username is set, a var username is now the value of that cookie, if not do the same test for cookie var admin
/
?>