Jump to content

[SOLVED] Where is the error


JADASDesigner

Recommended Posts

It brings up the picture, but not the title...  Where might the error be? It is probably staring me in the face, but I am going on 72 hours of no sleep, now.

<div class="productbox">
<?php
$product=SW45;
//connect to MySQL
$connect = mysql_connect("localhost", "jadasdes", "notreallymypassword")
or die("Hey loser, check your server connection.");
//make sure we’re using the right database
mysql_select_db("jadasdes_ppproducts");
$query = "SELECT * FROM products WHERE productid LIKE '$product'";
$results = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
extract($row);
echo "<img src=\"http://www.example.com/pp/images/".$productid."-largeimage.jpg\" align = \"left\">";
echo " <br> ";
echo "<a href = \"http://www.example.com/pp/Disguised_Pepper_Spray/index.php?=".$productid.">".$producttitle."</a>";
echo "<p>";
}
?>

</div>

Link to comment
https://forums.phpfreaks.com/topic/130757-solved-where-is-the-error/
Share on other sites

I was missing a \" on line 17. html error.  yay.  TGFRB  (THANK GOD FOR RED BULL)

<div class="productbox">
<?php
$product=SW45;
//connect to MySQL
$connect = mysql_connect("localhost", "jadasdes", "meaka003")
or die("Hey loser, check your server connection.");
//make sure we’re using the right database
mysql_select_db("jadasdes_ppproducts");
$query = "SELECT * FROM products WHERE productid LIKE '$product'";
$results = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
extract($row);
echo  $producttitle;
echo "<img src=\"http://www.jadasdesign.com/pp/images/".$productid."-largeimage.jpg\" align = \"left\">";
echo " <br> ";
echo "<a href = \"http://www.jadasdesign.com/pp/Disguised_Pepper_Spray/index.php?=".$productid."\">".$producttitle."</a>";
echo "<p>";
}
?>

</div>

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.