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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:46:32+00:00 2026-05-24T12:46:32+00:00

I have a .php file that looks like this: foreach($stmt->fetchAll() as $array) { echo

  • 0

I have a .php file that looks like this:

foreach($stmt->fetchAll() as $array)
              {
            echo '<div class="thumb" style="width: '.$array['thumb_width'].'px; height: '.$array['thumb_height'].'px;">
            <p><a href="showfile.php?image_id='.$array['image_id'].'">
            <img src="showthumbs.php?image_id='.$array['image_id'].'" alt="'.$array['image_name'].' /">
            </a></p>
            <p>'.$array['image_name'].'</p></div>';
            }

I am following the tutorial here to basically upload and show images. When I view source the page that is loaded (which you can test out here), for some reason it’s not displaying the image. I have the showthumbs.php on the same location as the location of the gallery.php. What am I missing?

  • 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-24T12:46:32+00:00Added an answer on May 24, 2026 at 12:46 pm

    You probalby have a line break before your <?php tag. That means something has already been output to the response body when you try to set the header. And Headers must be set before the Body is sent. Otherwise you get the error:

    Warning: Cannot modify header information – headers already sent

    Just look for any chars before <?php in showthumbs.php. My guess is it’s a space or new line.

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

Sidebar

Related Questions

I have a url rewrite that looks like this: RewriteEngine On RewriteRule ^cancun/tours/$ location-tours-listings.php?locationName=Cancun
I have a very simple XML file, that looks like this: <Data><Day Num=4197> <Date>270611</Date>
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
All, I have an XML document that looks something like this: <root> <profile> <childA>
Title says all. I'll have navigation that looks like this and it's dynamically created
I have an XML feed that looks like this: <?xml version=1.0 encoding=UTF-8?> <productFeed version=1.0
I have a PHP file that contains a lot of if and else statements
I have a php file that contains a form (which contains 2 input boxes
I have a PHP file that I need it to detect it's directory it's
First I have a PHP file that gets data and file from a HTML

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.