Hi,
Although I went online on many forums and ask my teacher why my burger button on my project doesn’t work, I cannot figure it out.
I downloaded the jquery.js and other css (slick, bootstrap, and my own and mentionned them in that order).
<html>
<head>
<!-- 1- JQuery-->
<script type="text/javascript" src="js/jquery.js"></script>
<!-- 2- SLICK FOR MY SLIDESHOW-->
<link rel="stylesheet" type="text/css" href="js/slick/slick.css" />
<!-- 3- Bootstrap-->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-grid.css">
<!-- 4-My css-->
<link rel="stylesheet" type="text/css" href="css/style.css">
I store this file in my folder named “inc”.
The thing is that I call this file named “header.inc.php” in all my other pages:
<?php
include_once("inc/timer.inc.php"); // starting my session
include("inc/database.inc.php"); // connection to my database
$title='cooking';
include("inc/header.inc.php"); // my header
I am suppose to start my session first but cannot figure out why the button doesn’t work.
I tried to invert the latest 2 includes (connection and header) and it didn’t change anything.
Is there any library I should get or do you see any errors I am too blind to see?
I downloaded the latest of all (bootstrap, jquery, slick)
Thanks people
I put all my menu page down there if that helps:
<?php
include("inc/database.inc.php");//connection cooking
?>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#"><h6>miam miam, gloup gloup, laps laps</h6></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto ">
<li class="nav-item">
<a class="nav-link" href="index.php">Home<span class="sr-only"></span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="Allrecipes.php">All recipes<span class="sr-only">(current)</span></a>
</li>
<?php
if(!empty($_SESSION['login'])) { ?>
<li class="nav-item">
<a class="nav-link" href="addrecipe.php">Add recipe<span class="sr-only"></span></a>
</li>
<?php } ?>
<!-- My search box -->
<?php include("recherche.inc.php");?>
<li class="nav-item">
<a class="nav-link" href="connection.php">Connection<span class="sr-only"></span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="subscribe.php">subscribe<span class="sr-only"></span></a>
</li>
<?php
if(!empty($_SESSION['login'])) { ?>
<li class="nav-item">
<a class="nav-link" href="member-detail.php">My profle<span class="sr-only"></span></a>
</li>
<?php } ?>
<?php
if(!empty($_SESSION['login'])) { ?>
<li class="nav-item">
<a class="nav-link" href="logout.php">logout<span class="sr-only"></span></a>
</li>
<?php } ?>
</ul>
</div>
</nav>
Below I have the body thanks to the “index.php” page and the footer thanks to “footer.inc.php”