Jump to content

[SOLVED] pictures not showing up


timmah1

Recommended Posts

With this code, only the first photo shows up, but there is two in the database.

 

This will show as a picture

<?php echo $image[0]; ?>

But this won't

<?php echo $image[1]; ?>

 

It will display the info, but it won't show the photo, any reason why?

 

<?php
include "DB_item_config.php";
$item = "SELECT * FROM items";
$result = mysql_query($item);
while($row = mysql_fetch_array( $result )){

$photo = $row['photo'];
$image = explode(',', $photo);
?>

<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[0]; ?>" width="100"><br>
<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[1]; ?>" width="100"><br>
<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[2]; ?>" width="100"><br>
<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[3]; ?>" width="100"><br>
<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[4]; ?>" width="100"><br>
<img src="http://www.mypantyraid.com/panty/items/<?php echo $image[5]; ?>" width="100"><br>
<?php
}
?>

 

Thank you in advance for any help

Link to comment
https://forums.phpfreaks.com/topic/85990-solved-pictures-not-showing-up/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.