Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.