$result = @mysql_query("SELECT U.name as name, U.surname as surname, U.username as username
FROM ".$_CONFIG['table_sessioni']." S,".$_CONFIG['table_utenti']." U
WHERE S.user_id = U.id and S.uid = '".$uid."'") or die(mysql_error());