Tenho um parecido....
Tipo, faço upload de 10 imagens ao mesmo tempo.... e é gravado o caminho delas em "Imagem"...
Da uma olhada ae.... estou colando uma parte do código... se não funcionar eu te envio o forulário completo pra analise....
<?
require_once("Conectar.php");
if(isset($_POST[enviar]))
{
if(!empty($_FILES[images][name][0]))
{
while(list($key,$value) = each($_FILES[images][name]))
{
if(!empty($value))
{
$NovoNome = $t."_imovel_".$value;
copy($_FILES[images][tmp_name][$key], "../imagens/".$NovoNome);
$MyImages[] = $NovoNome;
}
}
if(!empty($MyImages))
{
$ImageStr = implode("|", $MyImages);
}
}
$q1 = "insert into banco_imoveis set
Imagem = '$ImageStr'";
mysql_query($q1);
if(mysql_error())
{
$ErroRegistro = "<center><font color=red>Ocorreu um erro...<br>Por favor, tente novamente. </font>";
}
else
{
echo "<center><br><br><br><font face=verdana size=2 color=black><b>Imóvel cadastrado com sucesso!</b></font></center>";
exit();
}
}
?>
<form method="post" enctype="multipart/form-data">
<table width="302" align=center >
<!--DWLayoutTable-->
<caption align=center><font face=verdana size=2><b>Cadastro</b></font><br><?=$ErroRegistro?></caption>
<tr>
<td width="248" height="261" valign=top bgcolor="#F2F2F2">
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br>
<input type=file name="images[]"> <br> </td>
<td width="39"> </td>
</tr>
<tr>
<td height="26" align=center valign=top bgcolor="#F2F2F2">
<div align="left">
<input type=submit name=s1 value="Salvar">
</div></td>
<td></td>
</tr>
<tr>
<td height="18"></td>
<td></td>
</tr>
</table>
</form>
flw... abraço
Edição feita por: Etefis, 11/01/2005, 16:26.