Merhaba arkadaşlar php ile bir e ticaret sistemi yaptım ve sepet sist
eminde ürün fiyatlarını belirtmek için cookie kullandım, fakat cookie ile sepette toplam fiyatı belirtemiyorum aşağıya bakın anlıyacaksınız.
Toplam fiyatta 450 yazıyor fakat ben üstteki ürünlerin toplamını oraya bastırmak istiyorum.

[HTMLR]
<form action="#">
<div class="table-content table-responsive">
<table class="table">
<thead>
<tr>
<th class="li-product-remove"></th>
<th class="li-product-thumbnail">resim</th>
<th class="cart-product-name">başlık</th>
<th class="li-product-price">ücret</th>
<th class="li-product-quantity">adet</th>
<th class="li-product-subtotal"> toplam fiyat</th>
</tr>
</thead>
<tbody>
<?php
foreach ($_COOKIE['sepet'] as $key => $value) {
$urunler=$baglanti->prepare("SELECT * FROM urunler where urun_id=:urun_id order by urun_sira ASC");
$urunler->execute(array(
'urun_id'=>$key
));
$urunlercek=$urunler->fetch(PDO::FETCH_ASSOC);
?>
<tr>
<td class="li-product-remove"> <a href="islem?sepetsil&id=<?php echo $key ?>"><i class="fa fa-times"></i></a> </td>
<td class="li-product-thumbnail"><a href="#"><img style="width: 200px" src="Admin/resimler/urunler/<?php echo $urunlercek['urun_resim'] ?>" alt="Li's Product Image"></a></td>
<td class="li-product-name"><a href="#"><?php echo $urunlercek['urun_baslik'] ?></a></td>
<td class="li-product-price"><span class="amount"><?php echo $urunlercek['urun_fiyat'] ?>₺</span></td>
<td class="quantity">
<label>Adet</label>
<input class="col-md-2" value="<?php echo $value ?>" class="cart-plus-minus-box" value="1" type="text" readonly>
</td>
<td class="product-subtotal"><span class="amount"><?php echo $_COOKIE['fiyat'.$key]; ?>₺</span></td>
</tr>
<?php
$sepettoplam=$value * $_COOKIE['fiyat'.$key];
$kdv=$sepettoplam * 18/100;
$geneltoplam=$sepettoplam + $kdv;
?>
<?php } ?>
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-5 ml-auto">
<div class="cart-page-total">
<h2>Toplam fiyat</h2>
<ul>
<li>Toplam fiyat <span><?php echo $sepettoplam; ?>₺</span></li>
<li>Kdv <span><?php echo $kdv ?>₺</span></li>
<li>Genel toplam <span><?php echo $geneltoplam ?>₺</span></li>
</ul>
<a href="odeme/index">Alışverişi tamamla</a>
</div>
</div>
</div>
</form>
[COLOR=#D9DAE9][FONT="Open Sans"][/FONT][/COLOR][/HTMLR][COLOR=#D9DAE9][FONT="Open Sans"][/FONT][/COLOR]