
Vaske
Members-
Posts
11 -
Joined
-
Last visited
Everything posted by Vaske
-
No error report, just the image doesn't show up.
-
So I'm working on a project and want my carousel to present most recently added 3 images and each of those images needs to lead to its own page how would I possibly achieve this, I tried multiple times but I keep running into problems some of them I manage to figure out but at the end its always the same result of not working. Any help is much appreciated! Here is the carousel: <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> </ol> <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="amin/thumb/<?php $row['imgpath']; ?>" alt="First slide"> </div> <div class="carousel-item"> <img class="d-block w-100" src="..." alt="Second slide"> </div> <div class="carousel-item"> <img class="d-block w-100" src="..." alt="Third slide"> </div> </div> <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
-
What I meant to say was I just want to keep the card and have pagination with the cards instead of having a pagination with lists. But every tutorial or guide I find makes php and mysql paginations only with lists
-
So I'm making a project and want to have a pagination of cards using PHP and MySQL, but every tutorial I find shows only pagination of lists and I cant seem to figure out how to make pagination for cards work. Any help would be appreciated!
-
Hi I'm fairly new to this and want to make a pagination for my project, the problem is no matter how many times I try I cant seem to make it work without altering the code I already have. I would appreciate if someone could help me figure out How to make a pagination without altering the already existing code I have. Here is the page I want pagination on: <div class="content"> <div class="row"> <?php $query = "SELECT * FROM movie"; $run = mysqli_query($con,$query); if ($run) { while($row = mysqli_fetch_assoc($run)){ ?> <div class="col"> <div class="card border border-success" style="width: 18rem;text-align: center; background-color:#343a40;"> <img class="card-img-top" height="300px" width="100px" src="admin12312/thumb/<?php echo$row['imgpath']; ?>" alt="Card image cap"> <div class="card-body"> <h5 class="card-title" style="color: green;"><?php echo$row['name']; ?></h5> <br> <a href="viewmovie.php?id=<?php echo $row['id']; ?>" class="btn btn-outline-success my-2 my-sm-0">Watch</a> </div> </div> </div> <?php } } ?> </div> </div>
-
I wasn't to make a link go to a specific search but I cant seem to make it work, I would appreciate any help here! Here is a part of the main page: Categories </a> <div class="dropdown-menu" style="background-color: black;" aria-labelledby="navbarDropdown"> <a style="color: green;" class="dropdown-item" href="search.php?search=action">Action</a> <a style="color: green;" class="dropdown-item" href="search.php?search=comedy">Comedy</a> <a style="color: green;" class="dropdown-item" href="search.php?search=drama">Drama</a> <a style="color: green;" class="dropdown-item" href="search.php?search=fantasy">Fantasy</a> <a style="color: green;" class="dropdown-item" href="search.php?search=horror">Horror</a> <a style="color: green;" class="dropdown-item" href="search.php?search=mistery">Mistery</a> <a style="color: green;" class="dropdown-item" href="search.php?search=romance">Romance</a> <a style="color: green;" class="dropdown-item" href="search.php?search=thriller">Thriller</a> <a style="color: green;" class="dropdown-item" href="search.php?search=western">Western</a> <a style="color: green;" class="dropdown-item" href="search.php?search=scifi">SciFi</a> </div> </li> And here is the search.php: <?php include("db.php"); include("header.php"); include("footer.php"); ?> <div class="row"> <?php if(isset($_POST['submit'])){ $search = $_POST['search']; $searchpreg = preg_replace("#[^0-9a-z]#i", "", $search); $query = "SELECT * FROM movie WHERE name LIKE '%$search%' or genre LIKE '%$search%'"; $run = mysqli_query($con,$query); $count = mysqli_num_rows($run); if($count == 0){ echo "<div style='text-align:center;'><h1>No Movie Found</h1>".$search."</div>"; } else{ while($row = mysqli_fetch_assoc($run)){ ?> <div class="col"> <div class="card border border-success background-color:" style="width:200px; text-align:center; background-color:#343a40;"> <a href="viewmovie.php?id=<?php echo $row['id']; ?>"><?php echo "<img height='180px' width='180' src='admin12312/thumb/".$row['imgpath']."'>"; ?></a> <p style="color: green;"><?php echo $row['name']; ?></p> </div> </div> <?php } } } ?> </div>