<?
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[bruger] == "") {
print "Du mangler at udfylde dit navn!";
print "<br><br>";
}else{

if($_POST[opslag] == "") {
print "Du mangler at skrive et opslag!";
print "<br><br>";
}else{

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

mysql_query("INSERT INTO opslag (dato, bruger, opslag) VALUES ('$dato', '$_POST[bruger]', '$_POST[opslag]')")or die(mysql_error());
print "Du har nu lagt dit opslag ind!";
print "<br><br>";


}
}
}
?>



<form action="?side=admin/ny_opslag" method="POST">
<input type="hidden" name="action" value="opret">
Brugernavn:<br>
<input type="text" name="bruger" style="color:black; ;"><br>
Opslaget:<br>
<input type="text" name="opslag" style="color:black; ;"><br>
<input type="submit" value="Lęg op!" style="color:black; ;">

</form></body>
