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

  • Home
  • SEARCH
  • 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 7980059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:57:12+00:00 2026-06-04T09:57:12+00:00

I am showing an image on my page from the db table like this:

  • 0

I am showing an image on my page from the db table like this:

<?php
if ($db_found) {
$SQL = "SELECT * FROM myTable where id='$posted_id'";
$result = mysql_query($SQL);

while ($db_field = mysql_fetch_assoc($result)) {

echo '<img src="images/'.$db_field['image'].'" alt="" />';

}
mysql_close($db_handle);
}
?>

<a href="#">Next</a>

How can I do so that if $posted_id is for example 1 … when I click the “Next” link the image id = 2 appears and so on.

  • 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-04T09:57:13+00:00Added an answer on June 4, 2026 at 9:57 am

    for that you need to either refresh page or use ajax.

    you can pass variable posted_id in url like this.

    <a href="www.yourwebsite.com?posted_id=<?php echo ($db_field['id'] + 1);?>">Next</a>
    

    this way you can pass next id from database .. if your id falls in sequence.

    you also need to programatically handle issue like what to do if record of next id does’t exist in database..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please visit this link Click on first Image. Now is showing the Modal page
Is it possible to add image in an UIAlertView, like showing an image from
Ok, so in my page I am showing a background image with this css:
echo '<img src=data:image/jpg/png/jpeg;base64,' . base64_encode( $row['image'] ) . ' height=150 />'; This is showing
i am using display tag for showing table in my jsp page. I need
I have used this page from MSDN to apply a custom style to my
I'm trying to figure out a way to stop this flash message from showing
I have a view where I am showing image and image name in a
I have a UIImageView showing a image that is larger than it's frame. It's
OpenCV version 2.2, C++ interface. When showing a loaded image in a window with

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.