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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:35:16+00:00 2026-05-17T16:35:16+00:00

I need help with displaying images from a MySQL database. What I have is

  • 0

I need help with displaying images from a MySQL database.
What I have is a an Dynamic PHP/HTML table that has multiple pages with a pagination link.
The table layout is: Book Title, Author, Publisher, Category and image.
I can connect to database with connection script – working OK.
I can see all the information for the table at the correct column and row per above locations including the images.
At this point I hover over the link below the thumbnail image and use jQuery to pop up a larger view of the thumbnail, this works in all
browsers except for Internet Explorer.

First I connect to Database with a connection script.
This is the code I use to query database:

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 $bg = ($bg=='#ffffff' ? '#FCFCFC' : '#ffffff'); // Switch the background color. 
 echo '<tr bgcolor="' . $bg . '">
 <td id="books">' . '<h4>'. $row['booktitle'] .'</h4>'. '</td>
 <td id="auth">' . $row['author'] . '</td>
 <td id="publ">' . $row['publisher'] . '</td>
 <td id="cat">' . $row['category'] . '</td>
 <!--<td id="isbn">' . $row['isbn'] . '</td>--> 
 <td id="img">'.'<img src="'. $row['image'].'" width="90"/>'.'<div span="getLargeImage">'.'<a href="'. $row['image'].'" class="popup">Larger view</a>'.'</span>'.'</td>
</tr>';

here is the jQuery script:

$(document).ready(function(){

    $('.popup').hover(function(e) {
        var getId = $(this).attr("id");
        var getAttr = $(this).attr("href"); 
        var html = '<div id="full_img">';
        html += '<img src="'+ getAttr +' "/>';
        html += '</div>';
        //console.log(getId);
        //console.log(getAttr); 
        $('body').append(html).children('#full_img').hide().fadeIn(100);
        $('#full_img').animate({"width" : "0px","width" : "250px"}, 100);
        $('#full_img').css('top', e.pageY + -330).css('left', e.pageX - 350);

    }, function() {

        $('#full_img').animate({"width" : "250px","width" : "0px"}, 100);
        $('#full_img').fadeOut(10);
        $('#full_img').remove();  
    });

});

As I said above the jQuery hover/show larger image works works in all browsers except for Internet Explorer.
to see how it is working at this point surf to:

http://stevenjsteele.com/database/php/index.php

any help would be appreciated.
thanks
ussteele

  • 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-17T16:35:16+00:00Added an answer on May 17, 2026 at 4:35 pm

    Like I said in the comment – on your website you have a missing quote in the line:

    html += '<img src="'+ getAttr +'" />';
    

    See this working jsFiddle example

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

Sidebar

Related Questions

i need help with disk_total_space function.. i have this on my code <?php $sql=select
I have a regex call that I need help with. I haven't posted my
I really need help with interfaces in general... Any resources that you guys would
I have a site that currently uses images on a file server. The images
I have a sample RSS from Amazon. While the RSS displays correctly with images
i have a HyperLink on my site that is displaying an image instead of
My application is fetching a data dynamically from MYSQL and displaying. The Problem is
A few days ago i asked this question: Displaying images from Facebook photo albums
I have a webpage that requires login. Once a user has logged in I
I need help on this following aspx code aspx Code: <asp:Label ID =lblName runat

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.