How to display mysql table records as a navigation in bootstrap









up vote
0
down vote

favorite












I'm using bootstrap 4 and mysql, and am trying to display a table which has several records, to my list group in a way that I should be able to click each record and navigate to another page. I want your helps with the codes.
Tnx in advance.










share|improve this question



























    up vote
    0
    down vote

    favorite












    I'm using bootstrap 4 and mysql, and am trying to display a table which has several records, to my list group in a way that I should be able to click each record and navigate to another page. I want your helps with the codes.
    Tnx in advance.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm using bootstrap 4 and mysql, and am trying to display a table which has several records, to my list group in a way that I should be able to click each record and navigate to another page. I want your helps with the codes.
      Tnx in advance.










      share|improve this question















      I'm using bootstrap 4 and mysql, and am trying to display a table which has several records, to my list group in a way that I should be able to click each record and navigate to another page. I want your helps with the codes.
      Tnx in advance.







      php mysql bootstrap-4






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 9 at 4:42









      SuperShoot

      1,326517




      1,326517










      asked Nov 8 at 21:25









      Javad Mirzaiee

      1




      1






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Try this code:





           <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Home</a>
          </div>


          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">

          <?php

          $query = "SELECT * FROM categories LIMIT 3";
          $result = mysqli_query($connection,$query);

          while($row = mysqli_fetch_assoc($result))
          $title = $row['title'];
          $id = $row['id'];

          echo "<li><a href='category.php?category=$id'>$title</a></li>";


          ?>



          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>





          share|improve this answer




















          • What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
            – Javad Mirzaiee
            Nov 11 at 9:51










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53216368%2fhow-to-display-mysql-table-records-as-a-navigation-in-bootstrap%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Try this code:





           <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Home</a>
          </div>


          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">

          <?php

          $query = "SELECT * FROM categories LIMIT 3";
          $result = mysqli_query($connection,$query);

          while($row = mysqli_fetch_assoc($result))
          $title = $row['title'];
          $id = $row['id'];

          echo "<li><a href='category.php?category=$id'>$title</a></li>";


          ?>



          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>





          share|improve this answer




















          • What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
            – Javad Mirzaiee
            Nov 11 at 9:51














          up vote
          0
          down vote













          Try this code:





           <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Home</a>
          </div>


          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">

          <?php

          $query = "SELECT * FROM categories LIMIT 3";
          $result = mysqli_query($connection,$query);

          while($row = mysqli_fetch_assoc($result))
          $title = $row['title'];
          $id = $row['id'];

          echo "<li><a href='category.php?category=$id'>$title</a></li>";


          ?>



          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>





          share|improve this answer




















          • What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
            – Javad Mirzaiee
            Nov 11 at 9:51












          up vote
          0
          down vote










          up vote
          0
          down vote









          Try this code:





           <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Home</a>
          </div>


          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">

          <?php

          $query = "SELECT * FROM categories LIMIT 3";
          $result = mysqli_query($connection,$query);

          while($row = mysqli_fetch_assoc($result))
          $title = $row['title'];
          $id = $row['id'];

          echo "<li><a href='category.php?category=$id'>$title</a></li>";


          ?>



          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>





          share|improve this answer












          Try this code:





           <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Home</a>
          </div>


          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">

          <?php

          $query = "SELECT * FROM categories LIMIT 3";
          $result = mysqli_query($connection,$query);

          while($row = mysqli_fetch_assoc($result))
          $title = $row['title'];
          $id = $row['id'];

          echo "<li><a href='category.php?category=$id'>$title</a></li>";


          ?>



          </ul>
          </div>
          <!-- /.navbar-collapse -->
          </div>
          <!-- /.container -->
          </nav>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 at 21:59









          Rahul Gurujala

          4416




          4416











          • What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
            – Javad Mirzaiee
            Nov 11 at 9:51
















          • What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
            – Javad Mirzaiee
            Nov 11 at 9:51















          What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
          – Javad Mirzaiee
          Nov 11 at 9:51




          What I meant was: how can I display my table (in database) that has 9 records, as a link table in website? where I can click each record and take me to a different page.
          – Javad Mirzaiee
          Nov 11 at 9:51

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53216368%2fhow-to-display-mysql-table-records-as-a-navigation-in-bootstrap%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

          Edmonton

          Crossroads (UK TV series)