Hai provato cosi?

<input name="ADD" type="image" value="<? echo $res['id']; ?>" src="img/add.gif" alt="Aggiungi al Carrello">