Jump to content

Vaske

Members
  • Posts

    11
  • Joined

  • Last visited

Vaske's Achievements

Member

Member (2/5)

0

Reputation

  1. No error report, just the image doesn't show up.
  2. 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>
  3. 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
  4. 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!
  5. Honestly I have no idea, it just doesn't work when I change it to GET , but it doesnt matter to me much it works fine when I have 2 search pages so I'm fine with that. If it works I don't mind
  6. 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>
  7. Only changed the $_POST into $_GET but its fine I made a second search page and put $_POST in it to make the search bar work. Thanks again for all the help!
  8. ok so I did this and it works thank you! But now the search bar doesnt work at all. Any way to make both of them work together? Maybe I should make 2 search.php files one for each instance?
  9. I tried replacing the $_POST['search'] with $_GET['search'] but I end up getting undefined index: search
  10. Sorry to bother you, but I'm completely new to this and have been following a tutorial so far and I think I learned quite a bit, but some things I still need help with. Where do I put the $_GET['search'] and how do I use it?
  11. 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>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.