html - load php elements based on nav selections -


i want when user clicks on link takes birthday section of site loads images birthday folder. have categories defined can't seem work right. should img/catagory/filename.

<body> <main>  <?php //bring in external files include_once('config/spc_database.php'); include_once('object/cake.php');  //make db object: $database = new database();  //make connect: $conn=$database->getconnection(); //instantiate new movie object $cake =  new cake($conn); //get id being passed in url query string($_get array) //and store in id property cake object $cake->id = $_get['detailsid'];  //run select * query gets 1 row $stmt = $cake->readdetails(); //loop through variable, repeating procedure once per row             ?>  <div id="container" class="group">     <div class="left-content">     <?php     while($row = $stmt->fetch(pdo::fetch_assoc)) {     ?>         <div class="main-description-image">             <img src="img/all_cakes/<?php echo $row['large']; ?>" alt="placeholder" class="large-img"/>         </div>         <div class="cake-descript-info">             <h2 class="header-title"><?php echo $row['name']; ?></h2>             <p class="body-text-descript"><?php echo $row['description']; ?></p>             <span class="prices">cost: $<?php echo $row['price']; ?></span>         </div>     </div> </div> <div class="container-img">     <div class="dropdown-description styled-select">         <select id="category">             <option value="hide">-- pick category --</option>             <option value="wedding cakes">wedding cakes</option>             <option value="birthday cakes">birthday cakes</option>             <option value="cupcakes">cupcakes</option>             <option value="specialty sweets">specialty sweets</option>             <option value="traditional">traditional</option>             <option value="modern">modern</option>             <option value="themed">themed</option>             <option value="festive">festive</option>         </select>      </div>     <div class="top-left-box-description hvr-grow">              <a href="description.php?detailsid=<?php echo $row['id'];?>"> <img src="img/<?php echo $row['category']; ?>/<?php echo $row['thumb']; ?>" </a>     </div>     <div class="top-right-box-description hvr-grow">         <a href="description.php?detailsid=<?php echo $row['id'];?>"> <img src="img/all_cakes/<?php echo $row['thumb']; ?> " class="tmbnails"</a>     </div>     <div class="bottom-left-box-description hvr-grow">         <img src="img/small-thumbnail-placeholder3.jpg" class="tmbnails" alt=""/>     </div>     <div class="bottom-right-box-description hvr-grow">         <img src="img/small-thumbnail-placeholder4.jpg" class="tmbnails" alt=""/>     </div>     <div class="bottom-order-description">           <section class="buttons">             <div class="container-btn">                  <a href="#" class="btn btn-3">order</a>              </div>         </section>     </div> </div>          <?php  } ?>   

the page read details, read had categories read details did not $stmt = $this->conn->prepare('select id, name, category, description, price, thumb, large '.$this->table_name.' id='.$this->id);


Comments