non vorrei dire, ma non dovrebbe essere:

Codice PHP:
$result mysql_query("SELECT U.name as name, U.surname as surname, U.username as username, U.password as password 
    FROM "
.$_CONFIG['table_sessioni']." as S,".$_CONFIG['table_utenti']." as U 
    WHERE S.user_id = U.id and S.uid = '"
.$uid."'");