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 6649697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:48:19+00:00 2026-05-26T00:48:19+00:00

I have made a diary where I have a menu that echoes out every

  • 0

I have made a diary where I have a menu that echoes out every day and a text box that echoes the day’s entry, the page also contains an image slider that has a slideshow of some images.

So basically this is the code that calls the details from the database –

$sqlCommand = "SELECT * FROM images WHERE pageorder='$pageid'"; 
$result = mysql_query($sqlCommand) or die (mysql_error());

$allimages = '';
while ($row = mysql_fetch_array($result)) { 
    $images = $row['images'];
    $ititle = $row['title'];
    $idesc = $row['description'];

$allimages = '<li class="sliderImage"><img src=' . $images . ' /><span class="bottom"><strong>' . $ititle . '</strong><br />' . $idesc . '</span></li>';}

this is how I echo it

<div class='sliderholder'><div id='sliderholder'><div id='slider'><ul id='sliderContent'>
<?php echo $allimages ?>
<div class='clear sliderImage'></div></ul></div></div>

I have two databases, one is called pages that echoes out all the text and menu etc, then the other database contains links to the images with a column for pageorder so 1st January will have a page order of 1 and 31 december will be 365. This corresponds with the page id.

The way I have put the details into the images mysql table:

 id | images       | title         | description         | page order
---------------------------------------------------------------
 1  | images/1.jpg | title image 1 | Image description 1 | 1
 2  | images/2.jpg | title image 2 | Image description 2 | 1
 3  | images/3.jpg | title image 3 | Image description 3 | 2
 4  | images/4.jpg | title image 4 | Image description 4 | 2

so when I load the first page I want the image slider to show images 1 and 2. But what the slider does is that it shows only image 1, it will fade away and instead of showing the second image it goes back to image 1.

What should I do so that if I say for example select page 300 that will have a pageid of 300, and page order of 300 and all the images that are associated with the number 300, be it 2 images or 50 it should echo them in such a way that it slides through them all!?

  • 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-05-26T00:48:19+00:00Added an answer on May 26, 2026 at 12:48 am

    You’re setting $allimages on each iteration. Use .= rather than =.

    $allimages .= '<li class="sliderImage"><img src=' // ...
    //         ^^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a application and the logo appears on every page. All 3
I have a client who has made a 'Visual Diary' of photographs that he
I have made a player that plays mp3 and does the job very well
I have made a report that shows transactions in a certain time period for
I have made an app that has a permission for use of the vibrator.
I have made an application that displays a lot of questions from my database.
I have made a table using GtkTable and in that table I have attached
I have made a function that connects to a models 'pre_save' signal. Inside the
I have made webpage that uses Ajax to update some values without reloading the
I have made a tiny ModX snippet that looks like this <?php $theMenu =

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.