Jump to content

info not showing up


scmeeker

Recommended Posts

For some reason when echoing the $content, the price ($item_price) doesn't show up.  Everything else works perfect (so far ;) ).  I would appreciate another set of eyes on this.

 

Thanks!! :)

 

//validate item
$get_item_sql = "SELECT p.id, p.photo, p.username, p.title, p.date, p.price, p.location, p.store_id, s.store_id, s.username, s.store_name, s.location, s.news, s.websites FROM store AS s LEFT JOIN product AS p on s.store_id = p.store_id WHERE s.store_id = '".$_GET["store_id"]."'";
$get_item_res = mysqli_query($mysqli, $get_item_sql) or die(mysqli_error($mysqli));

if (mysqli_num_rows($get_item_res) < 1) {
   //invalid item
   $display_block .= "<p><em>Invalid item selection.</em></p>";
} else {
$content .= "<ul>\n";
   //valid item, get info
   while ($item_info = mysqli_fetch_array($get_item_res)) {
   $item_url = "items3.php?id={$items['id']}";
     $cat_id = $item_info['cat_id'];
   $cat_title = strtoupper(stripslashes($item_info['cat_title']));
   $store_id = $item_info['store_id'];
   $item_title = $item_info['title'];
   $item_store_name = $item_info['store_name'];
   $item_price = $items_info['price'];
     $item_photo = $item_info['photo'];
     $item_date =  $item_info['date'];
     $item_username = $item_info['username'];
   $item_news = $item_info['news'];
   $item_websites = $item_info['websites'];
   $item_location = $item_info['location'];
   $item_store_id = $item_info['store_id'];
   $content .= "";
              list($width) = getimagesize($item_photo);
  // set the maximum width of the image here
  $maxWidth = 100;
  if ($width > $maxWidth);
  
  $content .= "<table width=\"603\" border=\"0\"><tr><td width=\"101\"> <a href=\"{$item_url}\">
                    <img alt=\"Image\" border=0 width=\"{$maxWidth}\" src=\"{$item_photo}\" /></a><td width=\"201\">      <a href=\"{$item_url}\">{$item_title}</a></td>
                    <td width=\"109\">{$item_username}</td><td width=\"101\"> {$item_date}</td><td width=\"99\">      \${$item_price} USD </td></tr></table>";
                    $content .= "\n";

Link to comment
https://forums.phpfreaks.com/topic/205073-info-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.