Guest User

Untitled

a guest
Nov 3rd, 2011
1,502
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     //Conexão com Banco de Dados
  3.     include('conexao.php');
  4.    
  5.     //resgata o ID da URL
  6.     $id = (int)$_GET['id'];
  7.    
  8.     //Seleciona o produto filtrado pelo id
  9.     $sql = "SELECT * FROM produtos WHERE id = '$id'";
  10.    
  11.     //Executa o SQL
  12.     $query=  mysql_query($sql);
  13.    
  14.     //Resgata os valores da tabela
  15.     $row = mysql_fetch_assoc($query);
  16. ?>
  17.  
  18. <!DOCTYPE HTML>
  19. <html lang="en-US">
  20. <head>
  21.     <meta charset="UTF-8">
  22.     <title></title>
  23. </head>
  24. <body>
  25.     <h1>Produto : <?php echo $row['produto']?></h1>
  26.     <a href="carrinho.php?acao=add&id=<?php echo $row['id']?>">Adicionar no Carrinho</a>
  27. </body>
  28. </html>
  29.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×