[insert_php]
//Anslut
$link = mysql_connect(“bogedata.se.mysql”,”bogedata_se”,”EstLMXQe”);
$db = mysql_select_db(“bogedata_se”,$link);
if (isset($_GET[‘datorid’])) {
$sql = mysql_query(“select * from produkter where id = ‘$_GET[datorid]’ limit 1”) or die(mysql_error());
while ($rad=mysql_fetch_row($sql)) {
echo “

“;
echo ”

“;
if ($rad[7] != ” “){
echo “

“;
}
echo ”

“;
if (!empty($rad[24])) {
echo “

“;
}
echo ”

“;
if (!empty($rad[26])) {
echo “

“;
}
echo ”

Modellnamn $rad[2]
Skärm $rad[7]
Processor $rad[15]
Minne $rad[9] GB
Lagring “;
if (!empty($rad[13])) {
echo “$rad[13] GB SSD “;
}
if (!empty($rad[14])) {
echo “$rad[14] GB HDD”;
}
echo “
Grafikkort $rad[17]
Operativsystem $rad[21]
Batteritid $rad[24] Timmar
Garanti $rad[25] År
Vikt $rad[26] Kg

“;
echo “

“;
} else {
echo “

“;
}
echo “

“;
if (!empty($rad[22])) {
echo “

“;
} else {
echo “

“;
}

echo “

“;
if (!empty($rad[11])) {
echo “

“;
} else {
echo “

“;
}
echo “

“;
if (!empty($rad[18])) {
echo “

“;
} else {
echo “

“;
}

echo “

“;
if (!empty($rad[20])) {
echo “

“;
} else {
echo “

“;
}
echo “

“;
if (!empty($rad[16])) {
echo “

“;
} else {
echo “

“;
}
echo “

“;
echo “

“;
if (!empty($rad[23])) {
echo “

“;
} else {
echo “

“;
}
echo “

“;
if (!empty($rad[19])) {
echo “

“;
} else {
echo “

“;
}
echo “

“;
echo “

“;
if (!empty($rad[12])) {
echo “

“;
} else {
echo “

“;
}
echo “

HDMI: “;
if (!empty($rad[10])) {
echo “

JA NEJ Displayport: JA NEJ
VGA: JA NEJ LAN: JA NEJ
Bluetooth: JA NEJ USB 3.0: JA NEJ
DVI: JA NEJ Wlan: JA NEJ
DVD-RW: JA NEJ

Pris $rad[6]:- inkl. moms

“;

}
echo “Vi reserverar oss för eventuella felskrivningar. Lagersaldo kan variera.

“;
} else {
echo”

Sortiment på datorer i lager.
Dessa datorer har vi i lager. Är ni intresserade utav andra produkter eller tillverkare, kan vi få sälja de flesta modeller per beställning.

“;
$sql = mysql_query(“select * from produkter where datortyp = ‘stationar’ order by datum desc”) or die(mysql_error());
echo “

Lista Stationära datorer:

“;
while ($rad=mysql_fetch_row($sql)) {
echo “

“;}
echo “

“;
//LISTA LAPTOPS
$sql = mysql_query(“select * from produkter where datortyp = ‘barbar’ order by storlek asc”) or die(mysql_error());
echo “Lista Bärbara datorer:

“;
while ($rad=mysql_fetch_row($sql)) {
echo “

“;}
echo “

“;
}
[/insert_php]