<?php
include("config.php");
$side = $_GET[side];
$connect = mysql_connect($mysql_host, $mysql_user, $mysql_pw);
mysql_select_db($mysql_db,$connect);
if($side == info)
{
$id = $_GET[id];
$sql = mysql_query("SELECT * FROM `pc` WHERE id='$id'");
$row_pc = mysql_fetch_array($sql);
?>
<table border="0" width="539" height="30">
<tr>
<td width="65" height="6">Model:</td>
<td width="232" height="6"><?php echo "$row_pc[model]"; ?></td>
<td width="220" height="30" rowspan="3">"><?php echo "<img src=\\"$row_pc[billede]\\" width=\\"100\\" height=\\"100\\">"; ?></td>
</tr>
<tr>
<td width="65" height="7">Grafikkort:</td>
<td width="232" height="7"><?php echo "$row_pc[model]"; ?></td>
</tr>
<tr>
<td width="65" height="8">Bundkort:</td>
<td width="232" height="8"><?php echo "$row_pc[bundkort]"; ?></td>
</tr>
</table>
<?php
} else {
include("config.php");
$connect = mysql_connect($mysql_host, $mysql_user, $mysql_pw);
mysql_select_db($mysql_db,$connect);
$sql = mysql_query("SELECT * FROM `pc` ORDER BY id DESC");
while($row_pc = mysql_fetch_array($sql))
{
?>
<table>
<tr>
<td valign="top"><a href="?side=info&id=<?php echo "$row_pc[id] $row_pc[model]"; ?></a></td>
<td><a href="?side=info&id=<?php echo "$row_pc[id]\\">$row_pc[mobdel]"; ?></a></td>
<td><a href="?side=info&id=<?php echo "$row_pc[id]\\"><img src=\\"$row_pc[billede]\\" width=\\"100\\" height=\\"100\\">"; ?></a></td>
</tr>
</table>
<?php
}
}
?>
Nu bliver den kun 100 × 100 og linket til billedet er lige meget, om det er img/blabla.jpg eller
http://www.blabla.dk/blabla.jpg