<?
include("menu.php");
?>
<?
include "forb.php";
include "check.php";
$q1 = mysql_query("SELECT * FROM brugere WHERE brugernavn = '$_SESSION[Brugernavn]'");
$se = mysql_fetch_array($q1);
if($se[ordleg] == '1'){
$dato = date("d/m/y h:i:s");
mysql_query("INSERT INTO ordleg_s (ordet, pramie) VALUES ('$_POST[ordet]', '$_POST[præmie]')");
$q2 = mysql_query("SELECT * FROM ordleg_s ORDER by id DESC LIMIT 1");
$se2 = mysql_fetch_array($q2);
mysql_query("INSERT INTO tagwall (af, dato, besked, farve) VALUES ('Robot', '$dato', 'Den første person som siger: <b>$_POST[ordet]</b> - Vinder:  <b>$_POST[pramie]</b> Mønter! <a href=deltag_ordleg.php?id=$se2[id]><b>Deltag Her!</b></a>', 'orange')") or die(mysql_error());
print "<meta http-equiv='refresh' content='0; url=tagwall.php'>";
}
?>