<?php
if(isset($_COOKIE['mybbuser'])) {
$galletita = explode("_",$_COOKIE['mybbuser']);
$iduser = $galletita[0];
$consulta = mysql_query("SELECT * FROM mybb_users WHERE uid='{$iduser}'");
$datos = mysql_fetch_array($consulta);
echo "Bienvenido <b>{$datos['username']}</b>, (<a href='../foros/private.php'>{$datos['unreadpms']} / {$datos['totalpms']}</a> Mensajes) ";
} else {
?>
<input type="text" value="usuario" onclick="this.value='';"/>
<input type="text" value="password" onclick="this.value=''; this.type='password';"/>
<input type="button" value="Logearse" onmouseout="this.style.background='#66594e'" onmouseover="this.style.background='#76675a'" />
<?php } else { echo "logearse"; }