Hello peeps!
Trying to make a variable for a webpage that will list image from an external place based on the value from my database.
Example:
http://somewebpage.com/someimage.gif
I want it to fetch the image based on my "itemid" value from database.
Everything works, except listing image from that page with fetching the "itemid" with is the name of the files, ofcourse.
Following error occurs:
Notice: Use of undefined constant itemid - assumed 'itemid' in D:\Xampps\htdocs\shop2insert.php on line 114
Notice: Array to string conversion in D:\Xampps\htdocs\shop2insert.php on line 114
PHP File:
Anyone got any clue???
Trying to make a variable for a webpage that will list image from an external place based on the value from my database.
Example:
http://somewebpage.com/someimage.gif
I want it to fetch the image based on my "itemid" value from database.
Everything works, except listing image from that page with fetching the "itemid" with is the name of the files, ofcourse.
Following error occurs:
Notice: Use of undefined constant itemid - assumed 'itemid' in D:\Xampps\htdocs\shop2insert.php on line 114
Notice: Array to string conversion in D:\Xampps\htdocs\shop2insert.php on line 114
PHP File:
PHP:
$items=mysql_select_multi("SELECT itemid FROM test;");
$web="test.com";
?>
<tr>
<td><?php echo $row[1]; ?></td>
<td><?php echo $row[2]; ?></td>
<td><?php echo $row[3]; ?></td>
<td><?php echo $row[4]; ?></td>
<?php echo '<td><img src="http://'. $web .'/'. $items['itemid'] .'.'. $config['shop']['imageType'] .'" alt="img"></td>'; ?>

Anyone got any clue???
Last edited: