risolto..cioè ho capito che cosa non va..
se metto il semplice:
Codice PHP:
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="upfile">
<input type="hidden" name="MAX_FILE_SIZE" value="10000">
<input type="submit" value="Invia il file">
</form>
form fatto cosi funziona anche da locale..mentre se il form è fatto così non funziona:
Codice PHP:
<FORM enctype="multipart/form-data" name="inserzione" method="POST" action="insertvendita.php">
<fieldset><legend>Titolo:</legend>
<input name='titolo' type='text'>
</fieldset>
<fieldset><legend>Titolo:</legend>
<textarea name='Titolo' COLS='40' ROWS='5'></textarea>
</fieldset>
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<fieldset><legend>Carica immagine:</legend>
<input type="file" name="upfile">
</fieldset>
<fieldset><legend>Categoria</legend>
<select name="categoria" >
<?php
$sql = "SELECT * FROM categorie ";
$rs = $db->query($sql);
while( $row = $rs->fetchRow(DB_FETCHMODE_ORDERED) ){
echo '<option value='.$row[0].'>'.$row[1].'</option>';
}
?>
</select></fieldset>
<fieldset><legend>Pagamenti accettati: </legend>
<?php
$sql = "SELECT * FROM pagamento ";
$rs = $db->query($sql);
while( $row = $rs->fetchRow(DB_FETCHMODE_ORDERED) ){
echo '<input type="checkbox" name="tipo_pagamento[]" value="'.$row[0].'"/>'.$row[1].'
';
}
?>
</fieldset>
<fieldset><legend>Prezzo:</legend>
<input name='prezzo' type='text'>
</fieldset>
<INPUT type="submit" value="Invia"> <INPUT type="reset">
</FORM>