All right?
I'm trying to run this code:
if(empty($_FILES['imagem']['name'])){
$upload = new Upload();
$novoNome = $upload->efetuarUpload($_FILES["imagem"]);
$pontoTrocaAlterado->setImagem($novoNome);
}
I need only when the user uploads the file, it performs the Upload function and sets the new image name. However doing the tests, even when the user does not upload the file, the name is changed.
I've used several functions like:
in_array array_key_exists
But I did not succeed, could anyone help me?