there is no such function as "mysql_numrows()"

so which setcookie is not working. if it is the first one fix that function and then if it still doesn't work I am curious as to where $ubunreal_user is coming from. if it is from the database then you will hav to specify what row it had come from. so I would after the query is do a while statement adn get the info from the database so $ubunreal_user gets filled.