Jump to content

dedi_naber

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dedi_naber

  • Rank
    Newbie
  1. so could you please help me to solve ?
  2. Hi, Could you please help me about my little code blocks. I am new on PHP. There one tool on bootstrap which is select2 I am showing the products from database via this "select2" and after the submitting button I want to show the products which are selected in the below form. I can list on this form the products but I can not show the total price of the selected products. It is showing all products of sum not only selected . Also I am adding a picture of how it looks. l Could you please help me to solve this problem. Thanks <div class="layout-content"> <!-- [ content ] Start --> <div class="container-fluid flex-grow-1 container-p-y"> <h4 class="font-weight-bold py-3 mb-0">Teklif Oluştur</h4> <div class="text-muted small mt-0 mb-4 d-block breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#"><i class="feather icon-home"></i></a></li> <li class="breadcrumb-item">Forms</li> <li class="breadcrumb-item active">Teklif Oluştur</li> </ol> </div> <div class="card mb-4"> <h6 class="card-header">Teklif Oluştur</h6> <div class="card-body demo-vertical-spacing"> <form action="select.php" method="POST"> <!-- Multiple --> <?php //$urun_id=$uruncek['urun_id']; $kategorisor=$db->prepare("select * from urun2 "); $kategorisor->execute(); ?> <select class="select2-demo form-control" multiple style="width: 100%" name="course[]" multiple="multiple"> <?php while($kategoricek=$kategorisor->fetch(PDO::FETCH_ASSOC)) { $kategori_id=$kategoricek['urun_id']; $course = $_POST['course']; ?> <option value="<?php echo $kategoricek['urun_id']; ?>"><?php echo $kategoricek['urun_ad']; ?></option> <?php } ?> </select><br> <button type="submit" name="send" class="btn btn-primary">Ürün Ekle</button> <br><br> <p><strong>Not:</strong> Teklife eklemek istediğiniz ürünü listeden seçerek ekleyiniz.</p> </form> </div> </div> </div> <!-- [ content ] End --> <div class="container-fluid flex-grow-1 container-p-y"> <h4 class="font-weight-bold py-3 mb-0">Teklif</h4> <div class="text-muted small mt-0 mb-4 d-block breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#"><i class="feather icon-home"></i></a></li> <li class="breadcrumb-item active">Teklif</li> </ol> </div> <div class="card"> <div class="card-body p-5"> <div class="row"> <div class="col-sm-6 pb-4"> <div class="media align-items-center mb-4"> <a href="index-2.html" class="navbar-brand app-brand demo py-0 mr-4"> <span class="app-brand-logo demo"> <img src="#" alt="Şirket Logo" class="img-fluid"> </span> <span class="app-brand-text demo font-weight-bold text-dark ml-2">Şirket İsmi</span> </a> </div> <div class="mb-1">Adres Satırı</div> <div class="mb-1">Adres Satırı1..</div> <div>Telefon Bilgileri</div> </div> <div class="col-sm-6 text-right pb-4"> <h6 class="text-big text-large font-weight-bold mb-3">TEKLİFNO: <input style="border:none" type="text" placeholder="TEKLİFNO giriniz."></h6> <div class="mb-1">Tarih: <strong class="font-weight-semibold"><?php date_default_timezone_set('Etc/GMT-3'); echo date("d.m.Y"); ?></strong> </div> <div>Geçerlilik Tarihi: <strong class="font-weight-semibold"><?php date_default_timezone_set('Etc/GMT-3'); echo date('d.m.Y',strtotime('+15 days')); ?></strong> </div> </div> </div> <hr class="mb-4"> <div class="row"> <div class="col-sm-6 mb-4"> <div class="font-weight-bold mb-2">Teklifi Alan:</div> <div>Alice Robart</div> <div>Company LTD</div> <div>09 Bowman St.</div> <div>South Windsor, CT 06074</div> <div>United States</div> <div>+91 (999) 999 9999</div> <div>dummy@mail.com</div> </div> <div class="col-sm-6 mb-4"> <div class="font-weight-bold mb-2">Payment Details:</div> <table> <tbody> <tr> <td class="pr-3">Toplam Fiyat:</td> <td> <strong>$6,095.25</strong> </td> </tr> <tr> <td class="pr-3">Banka İsmi:</td> <td><input type="text" placeholder="Banka İsmi giriniz." style="border:none"></td> </tr> <tr> <td class="pr-3">Address:</td> <td><input type="text" placeholder="Adresi giriniz." style="border:none"></td> </tr> <tr> <td class="pr-3">Şehir:</td> <td><input type="text" placeholder="Şehir giriniz." style="border:none"></td> </tr> <tr> <td class="pr-3">Ülke:</td> <td><input type="text" placeholder="Şehir giriniz." style="border:none"></td> </tr> <tr> <td class="pr-3">IBAN:</td> <td><input type="text" placeholder="IBAN giriniz." style="border:none"></td> </tr> <tr> <td class="pr-3">SWIFT code:</td> <td><input type="text" placeholder="SWIFT Code giriniz." style="border:none"></td> </tr> </tbody> </table> </div> </div> <div class="table-responsive mb-4"> <table class="table m-0"> <thead> <tr> <th class="py-3"> Task description </th> <th class="py-3"> Nakit Fiyat </th> <th class="py-3"> Kredi Kartı Tek Çekim Fiyatı </th> <th class="py-3"> Kredi Kartı Taksitli Fiyatı </th> <th class="py-3"> Senet Fiyatı </th> </tr> </thead> <tbody> <? if($course){ foreach ($course as $c){ $urunsor=$db->prepare("SELECT * FROM urun2 where urun_id=:ad"); $urunsor->execute(array( 'ad' => $c )); $toplam = $uruncek['SUM(urun_fiyat)']; while($uruncek=$urunsor->fetch(PDO::FETCH_ASSOC)) { ?> <tr> <td class="py-3"> <div class="font-weight-semibold"><?php echo $uruncek['urun_ad'] ?></div> <div class="text-muted"><?php echo $uruncek['urun_seriNo'] ?></div> </td> <td class="py-3"> <strong><?php echo $uruncek['urun_fiyat'] ?> <i class="fas fa-lira-sign"></i></strong> </td> <td class="py-3"> <strong><?php echo $uruncek['urun_KKfiyat'] ?> <i class="fas fa-lira-sign"></i></strong> </td> <td class="py-3"> <strong><?php echo $uruncek['urun_KKTaksitfiyat'] ?> <i class="fas fa-lira-sign"></i></strong> </td> <td class="py-3"> <strong><?php echo $uruncek['urun_senetfiyat'] ?> <i class="fas fa-lira-sign"></i></strong> </td> </tr> <?php }}} ?> <tr> <td colspan="4" class="text-right py-3"> <span class="d-block text-big mt-2">TOPLAM:</span> Nakit Fiyat:<br> Kredi Kartı Fiyatı:<br> Kredi Kartı Taksitli Fiyatı:<br> Senet Fiyatı: </td> <td class="py-4"> <strong>: </strong><br> <strong> 15151515 <i class="fas fa-lira-sign"></i></strong><br> <strong> 1,219.05 <i class="fas fa-lira-sign"></i></strong><br> <strong> 1,219.05 <i class="fas fa-lira-sign"></i></strong><br> <strong> 6,095.25 <i class="fas fa-lira-sign"></i></strong> </td> </tr> </tbody> </table> </div> <div class="text-muted"> <strong>Note:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras laoreet, dolor id dapibus dapibus, neque mi tincidunt quam, quis congue ligula risus vitae magna. Curabitur ultrices nisi massa, nec viverra lorem feugiat sed. Mauris non porttitor nunc. Integer eu orci in magna auctor vestibulum. </div> </div> <div class="card-footer text-right"> <a href="print.php" target="_blank" class="btn btn-default"><i class="ion ion-md-print"></i>&nbsp; Print</a> <button type="button" class="btn btn-primary ml-2"><i class="ion ion-ios-paper-plane"></i>&nbsp; Send</button> </div> </div> </div> </div>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.