function created() { $match = new match(); $match->home = $_POST['home']; $match->away = $_POST['away']; $match->result = "undecided"; $match->date = $_POST['date']; $match->comment = $_POST['comment']; $match->create(); header("location: index.php"); }