• 07-04-2022, 14:38:00
    #1
    Arladaşlar herkese selamlar,

    Tab içerisinde php ile sekmeler getirmek istiyorum ancak türkçe geldiğinde ingilizceye bastığımda ingilizce gelmiyor, gelse de türkçe gitmiyor bu kodun doğrusu nasıl olmalı?

    <div class="col-lg-12">
            <div class="card">
          
                <div class="card-body">
                    <!-- Nav tabs -->
                    <ul class="nav nav-pills nav-justified" role="tablist">
                         <?php
                        if(!isset($_REQUEST['menu']));
                        $getmenu=$db->prepare("SELECT * from langs");
                        $getmenu->execute();
                        $count=0;
                        while($showmenu=$getmenu->fetch(PDO::FETCH_ASSOC)) { $count++?>
                        <?php $menuname = $showmenu['name']; ?>
                        <li class="nav-item waves-effect waves-light">
                            <a class="nav-link <?php if($showmenu['name']=="Türkçe") { ?> active <?php } ?> " data-bs-toggle="tab" href="#<?php echo $showmenu['name'] ?>" role="tab" aria-selected="true"><?php echo $showmenu['name'] ?></a>
                        </li>
                        <?php }?>
                    </ul>
    
    
                    <!-- Tab panes -->
                    <?php
                        if(!isset($_REQUEST['langs']));
                        $getmenu=$db->prepare("SELECT * from langs");
                        $getmenu->execute();
                        $count=0;
                        while($showmenu=$getmenu->fetch(PDO::FETCH_ASSOC)) { $count++?>
                        <?php $menuname = $showmenu['name']; ?>
                      
                        <div class="tab-content">
                            <div class="tab-pane p-3 <?php if($showmenu['name']=="Türkçe") { ?> active <?php } ?> " id="<?php echo $showmenu['name'] ?>" role="tabpanel">
                                <p class="text-muted mb-0">
                                <?php if($showmenu['name']=="Türkçe") { ?><?php echo $showmenu['name'] ?><?php }?>
                                </p>
                            </div>
                        </div>  
                    <?php }?>
                </div><!--end card-body-->
            </div><!--end card-->
        </div><!--end col-->
  • 07-04-2022, 14:42:14
    #2
    data-bs-target eksik.

    https://getbootstrap.com/docs/5.0/components/navs-tabs/
  • 07-04-2022, 14:45:29
    #3
    voLwy adlı üyeden alıntı: mesajı görüntüle
    hocam kullanım olarak buton değil a etiketi olarak kullanıyorum
  • 07-04-2022, 17:31:45
    #4
    +sorun devam etmekte :/
  • 07-04-2022, 22:27:49
    #5
    UretimAjansi adlı üyeden alıntı: mesajı görüntüle
    hocam kullanım olarak buton değil a etiketi olarak kullanıyorum
    hocam a veya buton farketmez data-bs-target vermezseniz nerden bilecek o taba gideceğini. data-bs-target eklemeden çalışmaz.
  • 07-04-2022, 22:28:59
    #6
    omergunay adlı üyeden alıntı: mesajı görüntüle
    hocam a veya buton farketmez data-bs-target vermezseniz nerden bilecek o taba gideceğini. data-bs-target eklemeden çalışmaz.
    direkt id ye göre atmıştım hocam ama tekrar deneyeyim o zaman o kısmı teşekkür ederim

    [COLOR=#D9DAE9][FONT=consolas]<div class="col-lg-12">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]        <div class="card">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]       [/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]            <div class="card-body">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                <!-- Nav tabs -->[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                <ul class="nav nav-pills nav-justified" role="tablist">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                     <?php[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    if(!isset($_REQUEST['menu']));[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $getmenu=$db->prepare("SELECT * from langs");[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $getmenu->execute();[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $count=0;[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    while($showmenu=$getmenu->fetch(PDO::FETCH_ASSOC)) { $count++?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    <?php $menuname = $showmenu['name']; ?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    <li class="nav-item waves-effect waves-light">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                        <button class="nav-link <?php if($showmenu['name']=="Türkçe") { ?> active <?php } ?> " data-bs-toggle="tab" data-bs-target="#<?php echo $showmenu['name'] ?>" role="tab" aria-selected="true"><?php echo $showmenu['name'] ?></button>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    </li>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    <?php }?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                </ul>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas] [/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas] [/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                <!-- Tab panes -->[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                <?php[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    if(!isset($_REQUEST['langs']));[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $getmenu=$db->prepare("SELECT * from langs");[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $getmenu->execute();[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    $count=0;[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    while($showmenu=$getmenu->fetch(PDO::FETCH_ASSOC)) { $count++?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    <?php $menuname = $showmenu['name']; ?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                   [/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    <div class="tab-content">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                        <div class="tab-pane p-3 <?php if($showmenu['name']=="Türkçe") { ?> active <?php } ?> " id="<?php echo $showmenu['name'] ?>" role="tabpanel">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                            <p class="text-muted mb-0">[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                            <?php if($showmenu['name']=="Türkçe") { ?><?php echo $showmenu['name'] ?><?php }?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                            </p>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                        </div>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                    </div>  [/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]                <?php }?>[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]            </div><!--end card-body-->[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]        </div><!--end card-->[/FONT][/COLOR]
    [COLOR=#D9DAE9][FONT=consolas]    </div><!--end col-->[/FONT][/COLOR]
    +Hocam yine çalışmadı rica etsem gösterebilir misiniz doğru mu yapıyorum
  • 11-04-2022, 15:32:30
    #7
    Sorunu çözdüm. data-bs-target ile ilgili bir durum değilmiş ilk verdiğim href değeri de problemsiz çalışıyor. Problem while döngüsünün ikinci alanda yanlış yere konumlandırılmasıymış. Yardımcı olmaya çalışan herkese teşekkür ederim.