1
I’m having difficulty to do multiple uploads,in the move_uploaded_file command it’s only sending one.
foreach ($imagem['name'] as $key => $fotos) {
if (isset($tipoAlbum)) {
$dados->setAlbum($tipoAlbum);
if (!file_exists($tipoAlbum)) {
@mkdir("album/" . $dados->getAlbum());
echo $imagem['tmp_name'][$key];
echo $fotos;
$t = $imagem['tmp_name'][$key];
move_uploaded_file($t, "album/" . $dados->getAlbum() . "/" . $dados->getImagem());
}
}
}
Can someone give me a hint?
What are all these variables? Where does it come from and how is it defined
$dados
? Are you taking care that every image has a unique name? Because if the name does not vary, the files will be overwritten and only the last one will exist.– Woss
$data is an object of the other class that only serves to Insert,select and also has get and set as extends and great tip I will put to not overwrite...
– heitor_deep