$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 '<table bgcolor="red">';
- print '<tr><th><b><font color="white">You already submitted results for this session</font></b></th><tr>';
+ $db->query("DELETE FROM workdone WHERE mnumber = $mnumber AND session = $sessionid");
+ print '<table bgcolor="lightgreen">';
+ print '<tr><th><b><font color="white">deleted old submission</font></b></th><tr>';
print '</table>';
- print "You can only submit your calculated examples once!";
- exit;
}
$excount = count($exchecked);
<th align="left">Mat.nummer:</th> <th align="left"><input type="text" name="mnumber"></th>
</tr>
<tr>
- <th align="left">Password:</th> <th align="left"><input type="text" name="password"></th>
+ <th align="left">Password:</th> <th align="left"><input type="password" name="password"></th>
</tr>
<tr><th colspan=2></th></tr>