Ok, trovato l'errore: era questo enctype="Text/plain" nel tag form che mi annullava tutto. Così, per curiosità: perchè?