<script language="JavаScript()"> function byebye() { document.cookie='uid=;password=;'; window.location='index.php?r'; alert(document.cookie); } </script> <?php echo "<a href='JavаScript:byebye()'>Выйти</a>"; ?>
<a href='#' onClick="byebye()">Выйти</a>