I need to include images into my gallery that are saved in my database The Next CEO of Stack OverflowSaving image from PHP URLdynamic image galleryDifference between require, include, require_once and include_once?Zend Framework layout or view lagUnable to identify whats wrong with my RegexPassing variables from HTML to PHP without formsIsotope Filtering Gallery from databaseUse PHP and MySQL to add images to a galleryadd custom class to image gallery in wordpressEcho an item from an array in php

In the "Harry Potter and the Order of the Phoenix" video game, what potion is used to sabotage Umbridge's speakers?

What difference does it make using sed with/without whitespaces?

Reshaping json / reparing json inside shell script (remove trailing comma)

How do I fit a non linear curve?

How to Implement Deterministic Encryption Safely in .NET

Why is information "lost" when it got into a black hole?

Players Circumventing the limitations of Wish

IC has pull-down resistors on SMBus lines?

Is it okay to majorly distort historical facts while writing a fiction story?

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

Help/tips for a first time writer?

What steps are necessary to read a Modern SSD in Medieval Europe?

Won the lottery - how do I keep the money?

Can this note be analyzed as a non-chord tone?

What are the unusually-enlarged wing sections on this P-38 Lightning?

Is it convenient to ask the journal's editor for two additional days to complete a review?

Expressing the idea of having a very busy time

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

Airplane gently rocking its wings during whole flight

Purpose of level-shifter with same in and out voltages

What was Carter Burke's job for "the company" in Aliens?

Does Germany produce more waste than the US?

Small nick on power cord from an electric alarm clock, and copper wiring exposed but intact

The Ultimate Number Sequence Puzzle



I need to include images into my gallery that are saved in my database



The Next CEO of Stack OverflowSaving image from PHP URLdynamic image galleryDifference between require, include, require_once and include_once?Zend Framework layout or view lagUnable to identify whats wrong with my RegexPassing variables from HTML to PHP without formsIsotope Filtering Gallery from databaseUse PHP and MySQL to add images to a galleryadd custom class to image gallery in wordpressEcho an item from an array in php










-1















I need my gallery to show images that are saved within my database please. So rather than me using the images source tag, I need the gallery to be filled with what's saved in the database please. So essentially showing the user all the images that ONLY belong to them if that makes sense? I guess the html code of the gallery should fall within the php while loop ?



The html gallery code:



 <div class="row">
<div class="grid-full">
<h3>ALL OF MY COMPETITION ENTRIES</h3>
<div class="masonry">
<div class="item">
<a href="Images/Nude.jpg" data-lightbox="gallery" data-title="Nude Pallette"><img alt src="Images/Nude.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/LakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District UK"><img alt src="Images/LakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MarbleCase.jpg" data-lightbox="gallery" data-title="Mac Bliss"><img alt src="Images/MarbleCase.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/HeadwoodBeach.jpg" data-lightbox="gallery" data-title="Headwood Beach"><img alt src="Images/HeadwoodBeach.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MacDesk.png" data-lightbox="gallery" data-title="Mac"><img alt src="Images/MacDesk.png" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/CoffeeonTable.jpg" data-lightbox="gallery" data-title="Fresh Latte"><img alt src="Images/CoffeeonTable.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/SilverMarble.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/SilverMarble.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Peonies.jpg" data-lightbox="gallery" data-title="Peonies"><img alt src="Images/Peonies.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Trousers.jpg" data-lightbox="gallery" data-title="Checked Trousers"><img alt src="Images/Trousers.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Greys.jpg" data-lightbox="gallery" data-title="Greys Pallette"><img alt src="Images/Greys.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Sunset.jpg" data-lightbox="gallery" data-title="Places I would rather be..."><img alt src="Images/Sunset.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Grey2.jpg" data-lightbox="gallery" data-title="Simple Sweater"><img alt src="Images/Grey2.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Nature.jpg" data-lightbox="gallery" data-title="Sunrise"><img alt src="Images/Nature.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/autumn.jpg" data-lightbox="gallery" data-title="Autumn"><img alt src="Images/autumn.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Tulips.jpg" data-lightbox="gallery" data-title="White Tulips"><img alt src="Images/Tulips.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Pink.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/Pink.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Outfit.jpg" data-lightbox="gallery" data-title="Outfit Ideas"><img alt src="Images/Outfit.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/BandW.jpg" data-lightbox="gallery" data-title="Simple"><img alt src="Images/BandW.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/TheLakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District"><img alt src="Images/TheLakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/FlowerTable.jpg" data-lightbox="gallery" data-title="Dressing Table"><img alt src="Images/FlowerTable.jpg" class="ImgRound"></a>
</div>
</div>
</div>
</div>


My Tables:



Image Table



I think my PHP query would look something like this:



<?php

$query = "SELECT * FROM `tblImage` WHERE `fldMemberID` = 1";

$result = $conn -> query($query);

while($row = $result -> fetch_assoc())
?>

<img src="<?php echo $row['fldFilePath']; ?>"> <br>

<?php

$conn -> close();
?>


UPDATE: After running the code, the following errors I get this appear where the gallery should be:
enter image description here










share|improve this question
























  • What's your question? Did you try to run your code?

    – Johnny Mopp
    Mar 7 at 18:06











  • So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

    – K.Haydock
    Mar 7 at 18:08







  • 1





    "I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

    – Magnus Eriksson
    Mar 7 at 18:08












  • I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

    – Chipster
    Mar 7 at 18:09






  • 1





    Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

    – RiggsFolly
    Mar 7 at 18:45















-1















I need my gallery to show images that are saved within my database please. So rather than me using the images source tag, I need the gallery to be filled with what's saved in the database please. So essentially showing the user all the images that ONLY belong to them if that makes sense? I guess the html code of the gallery should fall within the php while loop ?



The html gallery code:



 <div class="row">
<div class="grid-full">
<h3>ALL OF MY COMPETITION ENTRIES</h3>
<div class="masonry">
<div class="item">
<a href="Images/Nude.jpg" data-lightbox="gallery" data-title="Nude Pallette"><img alt src="Images/Nude.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/LakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District UK"><img alt src="Images/LakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MarbleCase.jpg" data-lightbox="gallery" data-title="Mac Bliss"><img alt src="Images/MarbleCase.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/HeadwoodBeach.jpg" data-lightbox="gallery" data-title="Headwood Beach"><img alt src="Images/HeadwoodBeach.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MacDesk.png" data-lightbox="gallery" data-title="Mac"><img alt src="Images/MacDesk.png" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/CoffeeonTable.jpg" data-lightbox="gallery" data-title="Fresh Latte"><img alt src="Images/CoffeeonTable.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/SilverMarble.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/SilverMarble.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Peonies.jpg" data-lightbox="gallery" data-title="Peonies"><img alt src="Images/Peonies.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Trousers.jpg" data-lightbox="gallery" data-title="Checked Trousers"><img alt src="Images/Trousers.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Greys.jpg" data-lightbox="gallery" data-title="Greys Pallette"><img alt src="Images/Greys.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Sunset.jpg" data-lightbox="gallery" data-title="Places I would rather be..."><img alt src="Images/Sunset.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Grey2.jpg" data-lightbox="gallery" data-title="Simple Sweater"><img alt src="Images/Grey2.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Nature.jpg" data-lightbox="gallery" data-title="Sunrise"><img alt src="Images/Nature.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/autumn.jpg" data-lightbox="gallery" data-title="Autumn"><img alt src="Images/autumn.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Tulips.jpg" data-lightbox="gallery" data-title="White Tulips"><img alt src="Images/Tulips.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Pink.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/Pink.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Outfit.jpg" data-lightbox="gallery" data-title="Outfit Ideas"><img alt src="Images/Outfit.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/BandW.jpg" data-lightbox="gallery" data-title="Simple"><img alt src="Images/BandW.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/TheLakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District"><img alt src="Images/TheLakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/FlowerTable.jpg" data-lightbox="gallery" data-title="Dressing Table"><img alt src="Images/FlowerTable.jpg" class="ImgRound"></a>
</div>
</div>
</div>
</div>


My Tables:



Image Table



I think my PHP query would look something like this:



<?php

$query = "SELECT * FROM `tblImage` WHERE `fldMemberID` = 1";

$result = $conn -> query($query);

while($row = $result -> fetch_assoc())
?>

<img src="<?php echo $row['fldFilePath']; ?>"> <br>

<?php

$conn -> close();
?>


UPDATE: After running the code, the following errors I get this appear where the gallery should be:
enter image description here










share|improve this question
























  • What's your question? Did you try to run your code?

    – Johnny Mopp
    Mar 7 at 18:06











  • So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

    – K.Haydock
    Mar 7 at 18:08







  • 1





    "I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

    – Magnus Eriksson
    Mar 7 at 18:08












  • I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

    – Chipster
    Mar 7 at 18:09






  • 1





    Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

    – RiggsFolly
    Mar 7 at 18:45













-1












-1








-1


2






I need my gallery to show images that are saved within my database please. So rather than me using the images source tag, I need the gallery to be filled with what's saved in the database please. So essentially showing the user all the images that ONLY belong to them if that makes sense? I guess the html code of the gallery should fall within the php while loop ?



The html gallery code:



 <div class="row">
<div class="grid-full">
<h3>ALL OF MY COMPETITION ENTRIES</h3>
<div class="masonry">
<div class="item">
<a href="Images/Nude.jpg" data-lightbox="gallery" data-title="Nude Pallette"><img alt src="Images/Nude.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/LakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District UK"><img alt src="Images/LakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MarbleCase.jpg" data-lightbox="gallery" data-title="Mac Bliss"><img alt src="Images/MarbleCase.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/HeadwoodBeach.jpg" data-lightbox="gallery" data-title="Headwood Beach"><img alt src="Images/HeadwoodBeach.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MacDesk.png" data-lightbox="gallery" data-title="Mac"><img alt src="Images/MacDesk.png" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/CoffeeonTable.jpg" data-lightbox="gallery" data-title="Fresh Latte"><img alt src="Images/CoffeeonTable.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/SilverMarble.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/SilverMarble.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Peonies.jpg" data-lightbox="gallery" data-title="Peonies"><img alt src="Images/Peonies.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Trousers.jpg" data-lightbox="gallery" data-title="Checked Trousers"><img alt src="Images/Trousers.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Greys.jpg" data-lightbox="gallery" data-title="Greys Pallette"><img alt src="Images/Greys.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Sunset.jpg" data-lightbox="gallery" data-title="Places I would rather be..."><img alt src="Images/Sunset.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Grey2.jpg" data-lightbox="gallery" data-title="Simple Sweater"><img alt src="Images/Grey2.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Nature.jpg" data-lightbox="gallery" data-title="Sunrise"><img alt src="Images/Nature.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/autumn.jpg" data-lightbox="gallery" data-title="Autumn"><img alt src="Images/autumn.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Tulips.jpg" data-lightbox="gallery" data-title="White Tulips"><img alt src="Images/Tulips.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Pink.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/Pink.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Outfit.jpg" data-lightbox="gallery" data-title="Outfit Ideas"><img alt src="Images/Outfit.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/BandW.jpg" data-lightbox="gallery" data-title="Simple"><img alt src="Images/BandW.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/TheLakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District"><img alt src="Images/TheLakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/FlowerTable.jpg" data-lightbox="gallery" data-title="Dressing Table"><img alt src="Images/FlowerTable.jpg" class="ImgRound"></a>
</div>
</div>
</div>
</div>


My Tables:



Image Table



I think my PHP query would look something like this:



<?php

$query = "SELECT * FROM `tblImage` WHERE `fldMemberID` = 1";

$result = $conn -> query($query);

while($row = $result -> fetch_assoc())
?>

<img src="<?php echo $row['fldFilePath']; ?>"> <br>

<?php

$conn -> close();
?>


UPDATE: After running the code, the following errors I get this appear where the gallery should be:
enter image description here










share|improve this question
















I need my gallery to show images that are saved within my database please. So rather than me using the images source tag, I need the gallery to be filled with what's saved in the database please. So essentially showing the user all the images that ONLY belong to them if that makes sense? I guess the html code of the gallery should fall within the php while loop ?



The html gallery code:



 <div class="row">
<div class="grid-full">
<h3>ALL OF MY COMPETITION ENTRIES</h3>
<div class="masonry">
<div class="item">
<a href="Images/Nude.jpg" data-lightbox="gallery" data-title="Nude Pallette"><img alt src="Images/Nude.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/LakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District UK"><img alt src="Images/LakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MarbleCase.jpg" data-lightbox="gallery" data-title="Mac Bliss"><img alt src="Images/MarbleCase.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/HeadwoodBeach.jpg" data-lightbox="gallery" data-title="Headwood Beach"><img alt src="Images/HeadwoodBeach.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/MacDesk.png" data-lightbox="gallery" data-title="Mac"><img alt src="Images/MacDesk.png" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/CoffeeonTable.jpg" data-lightbox="gallery" data-title="Fresh Latte"><img alt src="Images/CoffeeonTable.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/SilverMarble.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/SilverMarble.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Peonies.jpg" data-lightbox="gallery" data-title="Peonies"><img alt src="Images/Peonies.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Trousers.jpg" data-lightbox="gallery" data-title="Checked Trousers"><img alt src="Images/Trousers.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Greys.jpg" data-lightbox="gallery" data-title="Greys Pallette"><img alt src="Images/Greys.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Sunset.jpg" data-lightbox="gallery" data-title="Places I would rather be..."><img alt src="Images/Sunset.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Grey2.jpg" data-lightbox="gallery" data-title="Simple Sweater"><img alt src="Images/Grey2.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Nature.jpg" data-lightbox="gallery" data-title="Sunrise"><img alt src="Images/Nature.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/autumn.jpg" data-lightbox="gallery" data-title="Autumn"><img alt src="Images/autumn.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Tulips.jpg" data-lightbox="gallery" data-title="White Tulips"><img alt src="Images/Tulips.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Pink.jpg" data-lightbox="gallery" data-title="Mood Board"><img alt src="Images/Pink.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/Outfit.jpg" data-lightbox="gallery" data-title="Outfit Ideas"><img alt src="Images/Outfit.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/BandW.jpg" data-lightbox="gallery" data-title="Simple"><img alt src="Images/BandW.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/TheLakeDistrict.jpg" data-lightbox="gallery" data-title="The Lake District"><img alt src="Images/TheLakeDistrict.jpg" class="ImgRound"></a>
</div>
<div class="item">
<a href="Images/FlowerTable.jpg" data-lightbox="gallery" data-title="Dressing Table"><img alt src="Images/FlowerTable.jpg" class="ImgRound"></a>
</div>
</div>
</div>
</div>


My Tables:



Image Table



I think my PHP query would look something like this:



<?php

$query = "SELECT * FROM `tblImage` WHERE `fldMemberID` = 1";

$result = $conn -> query($query);

while($row = $result -> fetch_assoc())
?>

<img src="<?php echo $row['fldFilePath']; ?>"> <br>

<?php

$conn -> close();
?>


UPDATE: After running the code, the following errors I get this appear where the gallery should be:
enter image description here







php phpmyadmin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 18:31









RiggsFolly

72k1867113




72k1867113










asked Mar 7 at 17:59









K.HaydockK.Haydock

12210




12210












  • What's your question? Did you try to run your code?

    – Johnny Mopp
    Mar 7 at 18:06











  • So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

    – K.Haydock
    Mar 7 at 18:08







  • 1





    "I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

    – Magnus Eriksson
    Mar 7 at 18:08












  • I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

    – Chipster
    Mar 7 at 18:09






  • 1





    Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

    – RiggsFolly
    Mar 7 at 18:45

















  • What's your question? Did you try to run your code?

    – Johnny Mopp
    Mar 7 at 18:06











  • So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

    – K.Haydock
    Mar 7 at 18:08







  • 1





    "I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

    – Magnus Eriksson
    Mar 7 at 18:08












  • I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

    – Chipster
    Mar 7 at 18:09






  • 1





    Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

    – RiggsFolly
    Mar 7 at 18:45
















What's your question? Did you try to run your code?

– Johnny Mopp
Mar 7 at 18:06





What's your question? Did you try to run your code?

– Johnny Mopp
Mar 7 at 18:06













So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

– K.Haydock
Mar 7 at 18:08






So the question is that I need the gallery to be filled with images that are saved within the database table called Images as appose to just links to an image and I can't find the right php code to do this

– K.Haydock
Mar 7 at 18:08





1




1





"I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

– Magnus Eriksson
Mar 7 at 18:08






"I guess the html code of the gallery should fall within the php while loop ?" and "I think my PHP query would look something like this". - Haven't you even written and/or tried your code before posting? We're not human compilers that checks your code for you before you run it. We're here if you run into some specific issue with your existing code after you've run it.

– Magnus Eriksson
Mar 7 at 18:08














I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

– Chipster
Mar 7 at 18:09





I mean, the code you posted looks legit and should solve your problem. What's your question, exactly?

– Chipster
Mar 7 at 18:09




1




1





Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

– RiggsFolly
Mar 7 at 18:45





Is it possible that you ran a $conn -> close(); somewhere before this code ran? In reality I never do that, because PHP will do that for me when the script terminates.

– RiggsFolly
Mar 7 at 18:45












1 Answer
1






active

oldest

votes


















1














The answer was given by another user @RiggsFolly in the comments, further up in the code I had used a $conn -> close(); by deleting this the code ran fine.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050126%2fi-need-to-include-images-into-my-gallery-that-are-saved-in-my-database%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The answer was given by another user @RiggsFolly in the comments, further up in the code I had used a $conn -> close(); by deleting this the code ran fine.






    share|improve this answer



























      1














      The answer was given by another user @RiggsFolly in the comments, further up in the code I had used a $conn -> close(); by deleting this the code ran fine.






      share|improve this answer

























        1












        1








        1







        The answer was given by another user @RiggsFolly in the comments, further up in the code I had used a $conn -> close(); by deleting this the code ran fine.






        share|improve this answer













        The answer was given by another user @RiggsFolly in the comments, further up in the code I had used a $conn -> close(); by deleting this the code ran fine.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 15:53









        K.HaydockK.Haydock

        12210




        12210





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050126%2fi-need-to-include-images-into-my-gallery-that-are-saved-in-my-database%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved