<?
include("menu.php");
include("forb.php");
include("check.php");
?>
<head>
<link rel="stylesheet" HREF="style.css" type="text/css">
</head>
<?
if($_POST[action] == "opret") {

if($_POST[title] == "") {
print "Du mangler en title (Konkurrence navn)!";
print "<br><br>";
}else{

if($_POST[konkurrence] == "") {
print "Du mangler en Konkurrence!";
print "<br><br>";
}else{

$dato = date('d/m - h:i');

mysql_query("INSERT INTO konkurrencer (dato, title, konkurrence) VALUES ('$dato', '$_POST[title]', '$_POST[konkurrence]')")or die(mysql_error());
print "Ugens lej er nu oprettet!";
print "<br><br>";


}
}
}
?>



<form action="?side=admin/opret_kon" method="POST">
<input type="hidden" name="action" value="opret">

Billede-link: (Upload <a href="upload/upload.php"><b>HER</b></a>)<br>
<input type="text" name="title" style="color:black; ;"><br>
Information:<br>
<textarea name="konkurrence" rows="10" cols="50" style="color:black; ;"></textarea><br>
<input type="submit" value="Opret ugens lej" style="color:black; ;">

</form></body>
