Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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"; }
- if(insereProduto($conexao,$nome,$preco,$descricao,$categoria_id,$usado)){ ?>
- Produto <?= $nome; ?>, <?= $preco; ?> adicionado com sucesso!
- <?php }else{ $msg = mysqli_error($conexao); ?>
- O produto <? = $nome; ?> não foi adicionado: <?= $msg ?>
- <?php
- } ?> <?php include './rodape.php';?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement