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.
php mysql bootstrap-4
add a comment |
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.
php mysql bootstrap-4
add a comment |
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.
php mysql bootstrap-4
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
php mysql bootstrap-4
edited Nov 9 at 4:42
SuperShoot
1,326517
1,326517
asked Nov 8 at 21:25
Javad Mirzaiee
1
1
add a comment |
add a comment |
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>
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
add a comment |
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>
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
add a comment |
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>
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
add a comment |
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>
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>
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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