Advertisement
Guest User

Exemplo

a guest
Jan 13th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php include("./cabecalho.php"); include("./conecta.php") ; include("./banco-produto.php"); $nome = $_POST["nome"]; $preco = $_POST["preco"]; $descricao = $_POST['descricao']; $categoria_id = $_POST['categoria_id']; if(array_key_exists("usado", $_POST)){ $usado="true"; }else{ $usado="false"; }
  2.  
  3. if(insereProduto($conexao,$nome,$preco,$descricao,$categoria_id,$usado)){ ?>
  4.  
  5. Produto <?= $nome; ?>, <?= $preco; ?> adicionado com sucesso!
  6.  
  7. <?php }else{ $msg = mysqli_error($conexao); ?>
  8. O produto <? = $nome; ?> não foi adicionado: <?= $msg ?>
  9.  
  10. <?php
  11. } ?> <?php include './rodape.php';?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement