Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:12:06+00:00 2026-06-17T10:12:06+00:00

How can I make a slideshow, get information (image, title , content) from a

  • 0

How can I make a slideshow, get information (image, title , content) from a database for the site php, html, and css?

I want to make a slideshow for the last ten posts(products) or features posts (products) on header site. How can make this? Thanks.

So this script slideshow, I want to replaсe instead source (image, title , descriptions) from database, from the table posts.

<a href="#" class="show">
    <img src="images/flowing-rock.jpg" alt="Flowing Rock" width="580" height="360" title="" alt="" rel="<h3>Flowing Rock</h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "/>
</a>

<a href="#">
    <img src="images/grass-blades.jpg" alt="Grass Blades" width="580" height="360" title="" alt="" rel="<h3>Grass Blades</h3>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. "/>
</a>

<a href="#">
    <img src="images/ladybug.jpg" alt="Ladybug" width="580" height="360" title="" alt="" rel="<h3>Ladybug</h3>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."/>
</a>

<a href="#">
    <img src="images/lightning.jpg" alt="Lightning" width="580" height="360" title="" alt="" rel="<h3>Lightning</h3>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."/>
</a>

<a href="#">
    <img src="images/lotus.jpg" alt="Lotus" width="580" height="360" title="" alt="" rel="<h3>Lotus</h3>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo."/>
</a>

<a href="#">
    <img src="images/mojave.jpg" alt="Mojave" width="580" height="360" title="" alt="" rel="<h3>Mojave</h3>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt."/>
</a>

<a href="#">
    <img src="images/pier.jpg" alt="Pier" width="580" height="360" title="" alt="" rel="<h3>Pier</h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."/>
</a>

<a href="#">
    <img src="images/sea-mist.jpg" alt="Sea Mist" width="580" height="360" title="" alt="" rel="<h3>Sea Mist</h3>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."/>
</a>

<a href="#">
    <img src="images/stones.jpg" alt="Stone" width="580" height="360" title="" alt="" rel="<h3>Stone</h3>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."/>
</a>

I want post indeasted link image, code php to get the image from the database, as well as the title and content, but I want make (do{ wile())}, to get only last ten products.
`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:12:08+00:00Added an answer on June 17, 2026 at 10:12 am

    Well, you haven’t provided any details about your database structure… but let’s cover the basics…

    First, you need to perform a query that returns an array of 10 items (as arrays). Then you need to create a loop that outputs everything…

    In MySQLi, you’d do something like this…

    $objStmt = $this->objDb->prepare("
        SELECT image, imageAlt, imageTitle, imageRel FROM posts WHERE [some criteria is met];
    ");
    $objStmt->bind_param([some params to bind]);
    
    $objStmt->execute();
    $objStmt->bind_result($image, $imageAlt, $imageTitle, $imageRel);
    
    $arrItems = array();
    
    while ($objRow = $objStmt->fetch()) {
        $arrItem = array();
        $arrItem['image'] = $image;
        $arrItem['imageAlt'] = $imageAlt;
        $arrItem['imageTitle'] = $imageTitle;
        $arrItem['imageRel'] = $imageRel;
        array_push($arrItems, $arrItem);
        unset($arrItem);
    }
    

    And then…

        foreach ($arrItems as $arrItem) {
            printf('<a href="#" class="show"><img src="%s" alt="%s" width="580" height="360" title="%s" alt="" rel="%s"/></a>', $arrItem['image'], $arrItem['imageAlt'], $arrItem['imageTitle'], $arrItem['imageRel']);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!doctype html> <html> <head> <title>JQuery Cycle Plugin - Example Slideshow</title> <style type=text/css> .slideshow {
I can make a variable's name from two variables' value: $a = 'tea'; $b
No, I'm not talking about making a slideshow of pictures. How can I make
I'm working on a website where I want to display a giant image slideshow
I want to make a sort of repeating slideshow banner for my website, but
I'm trying to make a fairly simple image slideshow to replace a flash based
How can I make a CSS3 slideshow, with fade transitions, which would be timed?
I am new to CSS3 transitions. I am trying to make a image slideshow
Is there anyway of handling images from database to jquery image swapper or any
I'm using TopUp to make a simple slideshow. Unfortunately they don't expose the image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.