Alright, let me start by saying that I know zero PHP or SQL code, myself. I have a SQL guy creating tables, and I've been using what I've found on W3C Schools. So far it's been ok, but I have a problem I need solved.
I have created an HTML table that displays the content of a SQL table (thank you W3C). One of the fields in the table displays whether or not a person is approved. In the SQL table, this is shown with either a 1 or a 0, of course. I need a checkbox that the client can select and then write back to the table either 1 (approved) or 0 (denied), and then submit. If the time card is approved, I need it to show up in another table that is yet to be created. If the time card is denied, I need an email to be sent to the contractor with client notes, so that the time card can be adjusted accordingly.
Right now, the code looks like this:
echo "<table id='timecards'>
<tr>
<td align='center'>ID</td>
<td align='center'>Date</td>
<td>Notes</td>
<td align='center'>Hours</td>
<td align='center'>Approved</td>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td align='center'>" . $row['ContractorID'] . "</td>";
echo "<td align='center'>" . $row['JobTimecardDate'] . "</td>";
echo "<td align='left'>" . $row['JobProgressNotes'] . "</td>";
echo "<td align='center'>" . $row['JobHoursToBill'] . "</td>";
echo "<td align='center'>" . $row['JobHoursApproved'] . "</td>";
echo "</tr>";
}
echo "</table>";
"JobHoursApporoved" is the cell in question.
I realize that this is kind of a large request, but any help would be massively appreciated. Thank you so much.