Hello everyone,

I am looking for a banner/slider for both images and text. I want to be able to display 3 articles that are attached to the blog I am making and have them rotate, Here is an image of where the content will go.


I would like a slider like this one: Click here but with the query string and while string to show in the right places. Any ideas would be helpful, I already have a php code for this:

            $sql = 'SELECT * FROM `blog` ORDER BY `id` DESC LIMIT 0,3';
            $result = mysql_query($sql);

            while ($record = mysql_fetch_assoc($result)){
              $url = $record['productname'];
              $text = $record['price'];
              echo'<img src="images/blog/'.$record['img'].'" alt="pic" width="252" height="109" />';
              echo' <h3>'.$record['blogtitle'].',</h3>';
              echo' <p class="midText">';?><?php $position=22;

                $post = substr($message, 0, $position);

              echo $post;
              echo '...<font size="-2"><a href="blog.php?blogid='.$record['id'].'">Read More</a></font>'; ?>
              echo'<p class="midText2">Next article will show here.</p>';



Recommended Answers

All 2 Replies

Member Avatar

I'm lost as to what you want. The sample html for the slider in one the page you linked to. Can't you spit out the html from php?

What i am trying to acheive here is have the slider move all the elements that is listed in the php code, by using something similar to the one i posted but have the elements on a delay, The picture should go first, the title, quick text and next article should go after that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.