So now it's working ^^
Thanks you both so much for your help!!!!
Just to summerize :
Products.php
<head>
<title>Med-Tech.dk<title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<html>
<table class="main">
<tr>
<td class="banner" height="120px">
<div id="banner">
</div>
</td>
</tr>
<tr>
<td>
<div id="links">
<a href="index.php">Home</a> | <a href="products.php">Products</a> | <a href="contact.php">Contact</a>
</div>
</td>
</tr>
<tr>
<td>
<div id="bodytext">
<?php
$con = mysql_connect("localhost","reader","reader");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("medtech", $con);
$result = mysql_query("SELECT * FROM products");
while($row = mysql_fetch_array($result))
{
echo '<table class="products">';
echo '<tr>';
echo '<td colspan=2 class="leftrightborder">';
echo '<h1>';
echo $row['Name'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width=200 class="leftborder">';
##echo 'billede her';
echo '<IMG width=200 src=getProdImg.php?id=' . $row['ID'] . '>';
echo '</td>';
echo '<td class="rightborder">';
echo $row['SDesc'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan=2 class="leftrightborder">';
echo '<h3>';
echo $row['ArticleNR'] ;
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan=2 class="leftrightbotborder">';
echo $row['Desc'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="leftrightborder" colspan=2>';
echo ' ';
echo '</td>';
echo '</tr>';
echo '</table>';
}
mysql_close($con);
?>
</div>
</td>
</tr>
</table>
</html>
</body>
getProgImg.php:
<?php
##error_reporting(E_ALL)
$con = mysql_connect("localhost","reader","reader");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("medtech", $con);
if(isset($_GET['id'])) {
$id=$_GET['id'];
$res = mysql_query("select PIC from products where ID=" . $id);
$img = mysql_fetch_array($res);
header('Content-Type: image/jpeg');
echo $img[0];
}
?>
This is for a school project, so I really wanna credit your guys!
You can send me some info on whom to credit on a pm