hercioneto

PW1 2019 - updMarca.php

Nov 5th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="br">
  3.  
  4. <head>
  5.   <meta charset="utf-8">
  6.   <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.  
  8.   <meta name="description" content="">
  9.   <meta name="author" content="">
  10.   <title>Alterar Marca</title>
  11.  
  12. </head>
  13.  
  14. <body>
  15.           <?php
  16.           require "Marca.class.php";
  17.           if ($_POST) {
  18.               $idMarca = $_POST["idMarca"];
  19.               $nomeMarca = $_POST["marca"];
  20.              
  21.               $marca = new Marca();
  22.                 $marca->setMarca($nomeMarca);
  23.                 $marca->setIdMarca($idMarca);
  24.                 $resultado = $marca->alterar();
  25.     if ($resultado ==0) {
  26.         echo "Marca alterada com sucesso com o código: ". $marca->getIdMarca();
  27.         echo "<br/>";
  28.     }
  29.     else {
  30.         echo "Erro";
  31.     }
  32.              
  33.           }
  34.           else {
  35.               echo "Dados não preenchidos";
  36.           }
  37.           ?>
  38.        
  39. </body>
  40.  
  41. </html>
Add Comment
Please, Sign In to add comment