Fixed vulnerabilities
diff --git a/admin/insert.php b/admin/insert.php
index f6f836f..4301bdd 100644
--- a/admin/insert.php
+++ b/admin/insert.php
@@ -17,6 +17,8 @@
 		$template = "INSERT INTO `".$dbname."` (`id`, `nom`, `curs`, `grau`, `quimata`, `requested`, `mort`, `password`)" .
 					" VALUES (NULL, '".$user[0]."', '".$user[1]."', '".$user[2]."', ".$i.", '0', '0', '')";
 
-		if (query($template)) header("Location: ./index.php");
+		if (!query($template)) die("An error ocurred.");
 	}
+	
+	header("Location: ./index.php");
 ?>