Hi All,
I'm working on a website page that is displaying data from a SQL database. I have a series of echo statements display the data within a table:
echo "<table border '1' bordercolor='#333333' cellpadding='3' cellspacing='0' width='100%'>
<tr>
<th><span class='heading'>ID</span></th>
<th><span class='heading'>Date Submitted</span></th><th><span class='heading'>Location</span></th><th><span class='heading'>Type</span></th><th><span class='heading'>Request</span></th>
<th><span class='heading'>Start Date</span></th><th><span class='heading'>Ad Size</span></th><th><span class='heading'>Color/BW</span></th><th><span class='heading'>Deadline</span></th><th><span class='heading'>Shown Where?</span></th><th><span class='heading'>Run Dates</span></th><th><span class='heading'>Email Ad To:</span></th><th><span class='heading'>Approve</span></th><th><span class='heading'>Comple</span></th>
</tr>";
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" . $row['order_num'] . "</td>";
echo "<td>" . $row['datetime'] . "</td>";
echo "<td>" . $row['location'] . "</td>";
echo "<td>" . $row['type'] . "</td>";
echo "<td width='250px'>" . $row['request'] . "</td>";
echo "<td>" . $row['start'] . "</td>";
echo "<td>" . $row['size'] . "</td>";
echo "<td>" . $row['color'] . "</td>";
echo "<td>" . $row['deadline'] . "</td>";
echo "<td>" . $row['shown'] . "</td>";
echo "<td>" . $row['appear'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['approve'] . "</td>";
echo "<td>" . $row['complete'] . "</td>";
}
echo "</table>";
:
What I would like to do is provide an added function that will allow the manager to approve the order by adding a submit button that will call for the "order_num" of that table row and enter a hidden value into the "approve" field of the database. I've tried to accomplish this a couple of different ways, but all failed misurably.
Thanks in advance for any help that you can offer.