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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:20:39+00:00 2026-05-23T08:20:39+00:00

I have this script that work with no problems on my XAMPP local host:

  • 0

I have this script that work with no problems on my XAMPP local host:

<html>
<head>
<title>Gallery</title>
<style type="text/css">
body {
    margin: 0 auto;
    padding: 0;
    width: 500px;
    color: #000000;
    position: relative;
}
.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gallery li {
    margin: 10px;
    padding: 0;
    float: left;
    width: 120px;
    height: 100px;
}
.gallery img {
    background: #fff;
    border: solid 1px #ccc;
    padding: 4px;
    width: 110;
    height: 90;
}
.gallery a:hover img
{border: 1px solid #0000ff;
position: absolute;
top: 0; left: 0;
width:400;
height:300;
}
</style>
</head>

<body>
<ul class="gallery">
   <?php
//header("Content-type: image/jpg;\n");

  $db_connect = mysql_connect('localhost', 'Beta_tester', 'alfa1gama2');
        if(!$db_connect)
                {
                         die('Не може да се осъществи връзка с базата данни' . mysql_error());
                }
  mysql_select_db("Beta_tester", $db_connect);
  $rs = mysql_query('SELECT * FROM gallery WHERE oferta_id=2');


 while($row = mysql_fetch_array($rs))
  {
        echo '<li><a target="_blank" href="http://mysite/fimage.php?id='.$row['id'].'"><img src='.$row['location'].' alt="image"/></a></li>';
  }

?>
</ul>
</body>
</html>

On my local server it’s ok, but when I upload it on the production server i get this output:

Pic1:
enter image description here

It’s not shown very good but this is just an empty block with an icon of broken image.The head(content) is commented – I added it later because I saw a similar problem solved with this, but maybe I’m using it wrong or maybe it’s something else.

Thanks

Leron

  • 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-23T08:20:39+00:00Added an answer on May 23, 2026 at 8:20 am

    Make sure the location of the image (URL) is a valid one. Try to print the image url and try to open in another tab to make sure it’s a valid URL.

    Also, pass double-quotes on your image src attribute like:

    <img src="'.$row['location'].'" alt="image" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this RewriteRule that works too well :-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The
I can't seem to figure this one out. I have a validator-type script that
I have this script that collects data from users and I want to check
Well basically I have this script that takes a long time to execute and
I have this line in a useful Bash script that I haven't managed to
I have a Python script that is running a few ls commands. This script
I have a script that looks like this #!/bin/bash function something() { echo hello
I have to write a Matlab script that does this: The input is 2
I have a file hosting site that's using this script MFHS . I want
I have a simple script that does some search and replace. This is basically

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.