$myUpload = new Upload($_FILES["imagem"]); //print_r($myUpload); $Up = $myUpload->noticiaUpload(); } else { $noImage = new Noticias(); $noImage->noImageUp(); } header("Location:ViewNoticiasObj.php?success"); } else { header("Location:NoticiaObj.php?erro"); } } elseif (isset($_POST['excluir'])) { $object = new Noticias(); $object->id = $_POST['id']; //print_r($object); $object->ExcluirNoticias(); header("Location:ViewNoticiasObj.php?excluirOK"); } elseif (isset($_POST['atualizar'])) { $object = new Noticias(); $object->id = $_POST['id']; $object->autor = $_POST['autor']; $object->data = $_POST['data']; $object->hora = $_POST['hora']; $object->titulo = $_POST['titulo']; $object->linha_apoio = $_POST['linha_apoio']; $object->status = $_POST['status']; $object->categoria = $_POST['categoria']; $object->noticia = $_POST['noticia']; $object->url = $_POST['url']; $object->AtualizarNoticias(); $myUpload = new Upload($_FILES["imagem"]);