php - Only the last image displays from database -



php - Only the last image displays from database -

i asked question before no 1 help me unfort. have images , headings coming database problem 1 image displaying(the lastly image) need both display.

here revised code

$query = "select page_title, page_image pages id='$page'"; $result = mysqli_query($connection, $query); confirm_query($result); while ($page_fetch = mysqli_fetch_assoc($result)) { $page_title = $page_fetch['page_title']; $images = $page_fetch['page_image']; echo "<div class=\"content \">"; echo "<h3 class=\"words\"><a href=\"\"> $page_title </a></h3>"; echo "<a href=\"\"><img src='pics/" . $images . "' width=\"340\" height=\"252\" alt=\"\" /></a>"; echo "</div>"; //end box } // close while loop

here database pages

page_id id page_image page_title 1 1 ocean.jpg have @ ocean 2 1 house.jpg house

just info images must display dynamically , coming in form db page

your returning images query.

check view source page, find error their.

your returing image name not match image got in folder. (for sec one)

php sql

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -