[Resolvido] Upload
Ola meu codigo
Quero fazer uploud ,trocar o nome deles e colocar o nome deles no banco de dados.
$img0=$_FILES['img0'];
$img1=$_FILES['img1'];
$img2=$_FILES['img2'];
$img3=$_FILES['img3'];
$txt_cat=$_POST['txt_cat'];
$txt_serie=$_POST['txt_serie'];
mysql_query("INSERT INTO produtos (categoria,serie,imgthumb,img1,img2,img3) VALUES ('$txt_cat','$txt_serie','$txt_cat$txt_serie0.jpg','$txt_cat$txt_serie1.jpg','$txt_cat$txt_serie2.jpg','$txt_cat$txt_serie3.jpg')");
copy($img0,"F:\wamp\www\kitybr\img".'$txt_cat$txt_serie0.jpg');
copy($img1,"F:\wamp\www\kitybr\img".'$txt_cat$txt_serie1.jpg');
copy($img2,"F:\wamp\www\kitybr\img".'$txt_cat$txt_serie2.jpg');
copy($img3,"F:\wamp\www\kitybr\img".'$txt_cat$txt_serie3.jpg');
Arquivo html
<td><input type="file" name="img0" id="img0"></td>
</tr>
<tr>
<td bgcolor="#00CCFF">img1:</td>
<td><input type="file" name="img1" id="img1"></td>
</tr>
<tr>
<td bgcolor="#00CCFF">img2:</td>
<td><input type="file" name="img2" id="img2"></td>
</tr>
<tr>
<td bgcolor="#00CCFF">img3:</td>
<td><input type="file" name="img3" id="img3"></td>Discussão (12)
Carregando comentários...