Carrinho de Cotação
-
$cotacao = mysqli_query($conn,"select * from cotacao where ip = '$ip' and data = '$data' ");
$qtd_cot = 0;
$qtd_cot = mysqli_num_rows($cotacao);
if ($qtd_cot !== 0)
{
while ($lista_cotacao = mysqli_fetch_array($cotacao))
{
$id_produto = $lista_cotacao['id_prod'];
$id = $lista_cotacao['id'];
$complemento = $lista_cotacao['complemento'];
$prod = mysqli_query($conn,"select * from produto where id = '$id_produto' group by id");
while ($lista_produto = mysqli_fetch_array($prod))
{
$nome = $lista_produto['nome'];
echo "
- "; echo "$nome ($complemento)"; echo "Excluir "; } } } if ($qtd_cot == 0) { echo "Carrinho está vazio"; } ?>