<?
include("menu.php");
include_once("connect.php");
?><html>
<head>
<body>
<?php
$connect = mysql_query("SELECT * FROM garderobe WHERE id = '$_GET[id]'");
$se = mysql_fetch_array($connect);
$q1 = mysql_query("SELECT * FROM garderobe WHERE navn = '$se[navn]' AND ejer = '$_SESSION[Brugernavn]'");
$antal = mysql_num_rows($q1);
if($antal == '0'){
print "Snyder";
}else{
mysql_query("UPDATE brugere SET wearing = '$se[billede]' WHERE brugernavn = '$_SESSION[Brugernavn]'");
print "Du har nu skiftet tųj!";
}
?>
</body>
