hello... if someone could please give me a few pointers.. what i have is... $sql = mysql_query("select * from products where link like '%$term%'"); while ($row = mysql_fetch_array($sql)){ echo '<br/> Upc: '.$row['jan']; echo '<br/> '.$row['image_link']; } image_link is a link to a image http://yaoo.com/image.jpg Question - How would I get a image to display on the web page? I have tried things like - echo "<td><img src='" . $row['image_link'] . "' /></td>"; $i++; I keep on getting snyatx errors. thanks
Hi, By looking at the img line it seems correct, could you please post original code snippet itself along with the exact error message? That would help us identify problem correctly.
Thanks.. Yea I am not sure if there is a better way to build it or not... but here it is.. I just can't get the image to display... ERROR: Parse error: syntax error, unexpected '"', expecting ',' or ';' in /home/worldupc/public_html/search.php on line 19 Code: $sql = mysql_query("select * from products where link like '%$term%'"); while ($row = mysql_fetch_array($sql)){ echo '<br/> Upc: '.$row['jack']; echo '<br/> <img src='"'.$row['image_link']. "' />; } This is the line - echo '<br/> <img src='"'.$row['image_link']. "' />; I just can't get the image to show... because in image_link is http://jackone.com/boo.jpg ... I can however get the link to load fine just no image to show due to the <img link that I built..
Change following echo '<br/> <img src='"'.$row['image_link']. "' />; PHP: into echo '<br/> <img src="' . $row['image_link'] . '" />'; PHP:
ah! you are awesome! THANK YOU!! its always something stupid.. You want any money ? I'll send you $5.00 or something that sound ok?