Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Documento sem título</title>
- <link href="https://file.myfontastic.com/rYBcvg2i9tEtCvqd9GSZm8/icons.css" rel="stylesheet">
- <style>
- #imagem{width:400px;height:400px;margin-top:100px;margin-left:20px;border:solid 1px;position:absolute}
- #nome-produto{width:300px;height:30px;margin-top:100px;margin-left:440px;border:solid 1px;position:absolute}
- #preco{width:50px;height:30px;margin-top:200px;margin-left:450px;border:solid 1px;position:absolute}
- #qtd{width:50px;height:30px;margin-top:250px;margin-left:450px;border:solid 1px;position:absolute}
- #frete{width:50px;height:30px;margin-top:300px;margin-left:450px;border:solid 1px;position:absolute}
- #botao{width:200px;height:40px;margin-top:450px;margin-left:520px;border:solid 1px;position:absolute;background:#0C0;border-radius:3px;border:0px;font-family:Arial, Helvetica, sans-serif;font-size:15px;color:#FFF;line-height:30px;text-align:center}
- </style>
- </head>
- <body>
- <?php
- include "conexao.php";
- $qtd = ('qtd');
- $cor_id = ('cor_id');
- $id_produto = $_GET['id_produto'];
- $id_produto = filter_var($id_produto, FILTER_SANITIZE_NUMBER_INT); //resulta em 11
- $sql_visualizar = mysql_query("SELECT * FROM produtos WHERE id_produto = '$id_produto' ");
- while($linha = mysql_fetch_array($sql_visualizar)){
- $id_produto = $linha['id_produto'];
- $produto = $linha['produto'];
- $preco = $linha['preco'];
- $qtd = $linha['qtd'];
- $cor_id = $linha['cor_id'];
- }
- ?>
- <div id="imagem"></div>
- <form method="post" action="carrinho.php?&acao=add">
- <input type"hidden" name="id_produto" value="<?php echo $id_produto ?>">
- <div id="nome-produto"><input type="text" name="produto" value="<?php echo $produto ?>" /></div>
- <div id="preco"><input type="text" name="preco" value="<?php echo $preco ?>" /></div>
- <div id="frete"><select name="cor_id">
- <option value="1">Branco</option>
- <option value="2">vermelho</option>
- <option value="3">Amarelo</option>
- <option value="4">verde</option>
- </select></div>
- <div id="qtd">
- <select name="qtd">
- <option value="1" selected="selected">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- </select>
- </div>
- <div id="botao"><input type="submit" name="enviar" /></div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement