Jump to content

Help with Link code


rseigel

Recommended Posts

I'm using the following code:

 

$result = mysql_query('SELECT * FROM tmp_price_compare WHERE tmp_price_compare.supplier_reference NOT IN (SELECT product_supplier_reference FROM product_supplier)')
or die(mysql_error());
echo "NEW PRODUCTS<br /><br />";
while($row = mysql_fetch_array($result))
 {
 echo "<a href=https://www.mysupplier.com/item/item.lasso?dsc2=" . $row['supplier_reference'] . echo $row['supplier_reference'] . echo"</a><br />";
 }

 

The SELECT works perfectly and results are as expected.

 

I'm having trouble getting the link coded correctly.

 

I'm sure it's something silly. I was hoping someone with more experience than I could spot it.

 

Thanks,

 

Ron

Link to comment
https://forums.phpfreaks.com/topic/273768-help-with-link-code/
Share on other sites

Thanks Jessica. You are always awesome at pointing me in the right direction without spoon feeding it. Great way to learn. :)

 

The not closing the opening <a> tag was the one that I was overlooking.

 

Here's the final code that works:

 

while($row = mysql_fetch_array($result))
 {
 echo "<a href=https://www.bnfusa.com/item/item.lasso?dsc2=";
 echo $row['supplier_reference'];
 echo ">";
 echo $row['supplier_reference'];
 echo"</a><br />";
 }

 

Thanks again.

Link to comment
https://forums.phpfreaks.com/topic/273768-help-with-link-code/#findComment-1408873
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.