gli apicici vogliono anche id='$idref'

Codice PHP:
$sql "UPDATE immagini SET titolo='$titola1' WHERE id='$idref'"