Scusate, so che propongo un argomento trattato e ritrattato...ma le ho provate tutte e proprio non mi riesce.
Dopo varie ricerche in rete, ho deciso di optare per l'esempio troveto nella guida ufficiale (http://it2.php.net/manual/it/feature...pload.php)...e neanche questa volta funziona.
Posto i codici
form
Codice:
<FORM METHOD="POST" ACTION="fotografie_aeree_verticali_include.php" enctype="multipart/form-data" name="form1">
<tr height="38">
<td width="400" align="left" height="38" valign="middle">

<h5>Anno Ripresa:

<INPUT name="AnnoRipresa" TYPE="Text"id="AnnoRipresa"></h5>
</td><td>
<h5>Foto:</h5>
<input type="file" name="Foto" id="Foto">


</td>
</tr>
<tr height="38">
<td width="400" align="left" height="38">
<h5>Sensore:

<INPUT name="Sensore" TYPE="Text"id="Sensore"></h5>
</td>
</tr>
<tr height="53">
<td width="400" align="left" height="53">
<h5>Regione:

<INPUT name="Regione" TYPE="Text" id="Regione"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Provincia:

<INPUT name="Provincia" TYPE="Text"id="Provincia"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Comprensorio:

<INPUT name="Comprensorio" TYPE="Text"id="Comprensorio"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Comune:

<INPUT name="comune" TYPE="Text"id="comune"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Toponimo:

<INPUT name="Toponimo" TYPE="Text"id="Toponimo"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Tipo Evidenza:

<INPUT name="TipoEvidenza" TYPE="Text"id="TipoEvidenza"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Attestazione Documentaria:

<INPUT name="AttestazioneDocumentaria" TYPE="Text"id="AttestazioneDocumentaria"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Interpretazione:

<INPUT name="Interpretazione" TYPE="Text"id="Interpretazione"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Affidabilità:

<INPUT name="Affidabilità" TYPE="Text"id="Affidabilità"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Definizione:

<INPUT name="Definizione" TYPE="Text"id="Definizione"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5>Cronologia:

<INPUT name="Cronologia" TYPE="Text"id="Cronologia"></h5>
</td>
</tr>
<tr>
<td width="400" align="left">
<h5><INPUT TYPE="SUBMIT" VALUE="Insert"></h5></td>
</tr>
</form>

Questa è la pagina fotografie_aeree_verticali_include.php
Codice:
<?php
$db_host="...";
$db_user="...";
$db_password="...";
$db_database="...";
$connessione=mysql_connect($db_host,$db_user,$db_p assword) or die ("Errore nella connessione al Mysql:" . mysql_error());
mysql_select_db($db_database,$connessione) or die ("Errore nella selezione del db:" . mysql_error());

$uploaddir = './fotografie';
//fotografie corrisponde alla cartella nella quale vorrei fossero salvate le immagini
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "File is invalid.\n!";
}
print_r($_FILES);

$query = "INSERT INTO fotoaereeverticali (AnnoRipresa, Sensore, Regione, Provincia, Comprensorio, Comune, Toponimo, TipoEvidenza, AttestazioneDocumentaria, Interpretazione, Affidabilità, Definizione, Cronologia, Foto) VALUES
('".$_POST['AnnoRipresa']."', '".$_POST['Sensore']."', '".$_POST['Regione']."', '".$_POST['Provincia']."', '".$_POST['Comprensorio']."', '".$_POST['Comune']."', '".$_POST['Toponimo']."', '".$_POST['TipoEvidenza']."', '".$_POST['AttestazioneDocumentaria']."', '".$_POST['Interpretazione']."', '".$_POST['Affidabilità']."', '".$_POST['Definizione']."', '".$_POST['Cronologia']."', '".$_FILES['upfile'] ['name']."')";

$Result=mysql_query($query) or die ("Errore nella query:" . mysql_error());
echo "Record inserito con successo";
echo $_FILE['upfile']['name'];
?>

E questo è l'errore chee mi da
Codice:
File is invalid. !Array ( [Foto] => Array ( [name] => Intervista CorriereSera.jpg [type] => image/jpeg [tmp_name] => /tmp/phpDanWDa [error] => 0 [size] => 665388 ) ) Record inserito con successo

Qualcuno può aiutarmi?