Hi, everyone!
I need some urgent help with displaying images in a web page from a database. I've created the table picture in phpmydamin and it has these columns: id_picture( wich is the primary key), name, description and the pic_url ( wich contains the url path of the image for example: images/pic_1.jpeg). For now I just want to display the image, but instead it displays the url path as a text that is located in the pic_url column. This is the code I'm using:
<?php
mysql_connect("localhost","root","")
or die('Could not connect: ' . mysql_error());
mysql_select_db("art");
$result = mysql_query("SELECT * FROM picture");
?>
<?php
while($rows=mysql_fetch_array($result)){
$pictur=$rows["id_picture"];
?>
<?php
echo"<a > $rows[pic_url]</a>";
?>
<?php
}
mysql_close();
?>