ho scoperto inoltre che inserendo la variabile diretta funzia ma se me la vado a prendere su db no! :-(

funzia
Codice PHP:
    echo "<a href=\"" $dati["url"] . $iduser "\"" " target=\""$dati["target"] . "\">" $dati["testo_click"] . "</a>"
Non funzia
Codice PHP:
    echo "<a href=\"" $dati["url"] . $dati["cod_agenti"] . "\"" " target=\""$dati["target"] . "\">" $dati["testo_click"] . "</a>"
anche se nel db c'è scritto $iduser

illuminatemi