I am implementing a system that records minutes from a meeting between a student and supervisor. When the student submits meetings the 'status' is set to submitted by default. When a supervisor logs in they can view the same set of minutes, however they are required to edit some fields and either set a new status to 'rejected' or 'approved'. I have set the status field to enum with the corresponding status's. I am finding it hard to implement this when the supervisor clicks 'edit', at the minute it, it only allows a supervisor to hand type somthing in :( has anyone any idea on how to go about this? (code below) ANY help would be MUCH appreciated.
if (isset($_POST['editMinuteID']) && $_POST['editMinuteID']==$ID) {echo "<tr class='$rowClass '>
<form style='display:inline' method='post' action='supervisorminutes.php'>
<input type='hidden' name='editCommitID' value='$ID'>
<td><input type='varchar' readonly name='editB_number' value='$B_number'></td>
<td><input type='date' readonly name='editDate' value='$Date'></td>
<td><input type='time' readonly name='editTime' value='$Time'></td>
<td><input type='text' readonly name='editDiscussion' value='$Discussion'></td>
<td><input type='text' readonly name='editActions' value='$Actions'></td>
<td><input type='date' readonly name='editDateofnextmeeting' value='$Dateofnextmeeting'></td>
<td><input type='enum' name='editStatus' value='$Status'> </td>
<td><input type='varchar' readonly name='editE_number' value='$E_number'></td>
<td><input type='text' name='editSupervisor_comments' value='$Supervisor_comments'></td>
<td colspan='2'><input type='image' src='edit.png'>
</form>
</tr>";
} else {
echo "<tr class='$rowClass'><td>$B_number</td><td>$Date</td><td>$Time</td><td>$Discussion</td><td>$Actions</td><td>$Dateofnextmeeting</td><td>$Status</td><td>$E_number</td><td>$Supervisor_comments</td>
<td class='operation'>
<form class='display:inline' method='post' action='supervisorminutes.php'>
<input type='hidden' name='editMinuteID' value='$ID'>
<input type='image' src='edit.png' style='padding- top:7px'>
</form></td>
<td class='operation'>
<form class='display:inline' method='post' action='supervisorminutes.php'
onsubmit='return confirm(\"Are you sure?\")'>
<input type='hidden' name='deleteMinuteID' value='$ID'>
<input type='image' src='delete.png' style='padding-top:7px'>
</form></td>
</tr>";
}
}
Aucun commentaire:
Enregistrer un commentaire