Jump to content

php vs. mysql vs image


soniamcangel

Recommended Posts

Hey guys!

I'm having an issue with my school project.

What I m trying to to is to create a simple dj store website.

I extract all i need from mysql without any issues.

but, when I want to get my photo out it doesn t work

here  is my table

 

row.JPG

 

 

 

<html>
<head>

<title>Dj Shop</title>
</head>

<body>

<p align="center"><img src="logo.png" width="208" height="91"></p>
<p align="center"><img src="bar.png" width="947" height="75"></p>
<hr>
<p> </p>
<div align="center"></div>
<p>
  <?php
  

$myid = $_GET["brands"];
print $myid;
//connection
mysql_connect("mysql","username","pass") or die ('I cannot connect to the database:' . mysql_error());
mysql_select_db("djstore");

$query = mysql_query("SELECT * FROM store WHERE idbrands = ". $myid);


// Show results

while($row = mysql_fetch_array($query)) {
echo  "<br /> Brands: ".$row ['brandsname'].
"<br /> Platform: ".$row['platform'].
"<br /> price: ".$row['price'].
"<br /> image: ".$row['image']." <br />";} // here is where i call the picture, but i m sure it s wrong! how to it through varchar


      
?>
  
  
</p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"><img src="bas.png" width="983" height="289"></p>
<p> </p>
</body>
</html>

 

 

 

please help me, thanks!

 

Sonia

Link to comment
https://forums.phpfreaks.com/topic/156995-php-vs-mysql-vs-image/
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.