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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:02:10+00:00 2026-06-09T12:02:10+00:00

I have written a web application that involves having users upload pictures to the

  • 0

I have written a web application that involves having users upload pictures to the site. On the homepage, I dynamically show the newest pictures/items uploaded in PHP, limiting it to ten. However, the page looks so static and I have searched on Google, bing, ask, yahoo, etc for days now and haven’t had any answers.

I have written the code to store store the images, and get them from the db.
The images are shown on the homepage, and the only thing i have left to do is load it in a slider.

$sql = mysql_query("SELECT * FROM items ORDER BY item_date_added DESC LIMIT 10")or die(mysql_error());
while($row = mysql_fetch_array($sql)) {
    //$user_id = $row['user_id'];
    $item_name = $row['item_name'];
    $item_id = $row['item_id'];

    $check_pic = "users/$item_name.jpg";

    if (file_exists($check_pic)) {
        $show_pic = "<img src=\"users/$item_name.jpg\" width=\"100px\" height=\"100px\" border=\"5\" id='img'/>";

        //$user_pic3 = "<img src=\"users/$rid/image01.jpg\" width=\"50px\" height=\"50px\" border=\"1\" />";
        //$MemberDisplayList .= '<a href="profile2/index.php?id=' . $rid . '">' . $user_pic3 . '</a>';
        $i++;
        $show_new_items .= "<a href='item_view?item_id=$item_id&&session_item=$item_id'>$show_pic</a>";
    }
    $newly_listed_names .= " <a href='item_view?item_id=$item_id&&session_item=$item_id'> $item_name </a> | ";
}

///////// END SHOW NEWLY ADDED ITEMS ///////////////////////////////////////////////////

the newly added items in echoed in a div in the body.

Can anyone help me please! it’s been bothering me for a while now. Thanks.

  • 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-09T12:02:11+00:00Added an answer on June 9, 2026 at 12:02 pm

    To use Nivo, you need to generate html that looks something like this… (Download the nivo demo and open up the demo.html for the full source).

    So all you need to do is output your images in a loop inside the slider div.

    <div id="wrapper">
        <div class="slider-wrapper theme-default">
            <div id="slider" class="nivoSlider">
        <?php
            while($row = mysql_fetch_array($sql)){
                $item_name = $row['item_name'];
                $item_id = $row['item_id'];
                $check_pic = "users/$item_name.jpg";
                if (file_exists($check_pic)) {
                    print "<img src=\"users/$item_name.jpg\"/>";
                    $i++;
                }
            }
        ?>
                <img src="images/2.jpg" data-thumb="images/2.jpg" alt=""/>
            </div>
        </div>
    </div>
    
    <script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="../jquery.nivo.slider.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have never written any code that uses threads. I have a web application
I have written a application that parses the html code of some web pages.
I have a legacy web application that was written long before there were even
I have written an application that queries a web service I wrote (which returns
I have written a desktop application that uses a web page as the GUI,
I have written a web application that posts a file via http to a
I have written a web service application, in that I have created an INI
I have written a web application that interacts with Google calendar (adds/edits/updates events). You
I have inherited a poorly written web application that seems to have errors when
I have a web application that was originally written on .Net 1.1 Framework. I

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.