X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/78533c089d9413327f981cb2b20090a28f25e5e5..10fa45cd744a59490f4a7e4cb047589d9a8314c0:/submit.php?ds=sidebyside
diff --git a/submit.php b/submit.php
index b8e1d7e..fa581f8 100644
--- a/submit.php
+++ b/submit.php
@@ -17,15 +17,14 @@
$sessionid = $SESSIONS[$SESSIONS_next]['id'];
if($db->query("SELECT COUNT(*) FROM workdone WHERE mnumber = $mnumber AND session = $sessionid")->fetch(PDO::FETCH_NUM)[0] == 1) {
- print '
';
- print 'You already submitted results for this session |
---|
';
+ $db->query("DELETE FROM workdone WHERE mnumber = $mnumber AND session = $sessionid");
+ print '';
+ print 'deleted old submission |
---|
';
print '
';
- print "You can only submit your calculated examples once!";
- exit;
}
$excount = count($exchecked);
- $donestring = implode(', ', $exchecked);
+ $donestring = implode(',', $exchecked);
$db->query("INSERT INTO workdone (mnumber,session,manydone,thisdone)
VALUES (\"$mnumber\", \"$sessionid\", \"$excount\", \"$donestring\")");