I have 2 timestamp fields in a table.
recieved, and resolved.
I have problems catching the resolved time with this code:
Excuse the messy HTML
page1:
echo ("<form action=\"callupdt.php\" method=\"post\">");
echo ("<th><input type=\"checkbox\" name=\"closed[]\" value=\"".$POST['closed']."\"> Closed </th>");
echo ("<td><input type=\"submit\" name=\"closed[]\" value=\"".$SESSION['qid']."\">Update</td>");
page2: callupdt.php
<?php
session_start();
$SESSION['closed'] = $POST['closed'];
$SESSION['qid'] = $POST['qid'];
if (isset($POST['closed']))
{
foreach ($POST['closed'] as value))
{
$conn=@mysql_connect("localhost", "root", "triadpass")
or die("Err:conn");
$rs = @mysql_select_db("snow", $conn)
or die("Err:conn1");
$sql = "UPDATE request set closed = now() where qid =".$value;
$rs = mysql_query($sql, $conn);
if($rs)
{
echo("<table aborder=\"0\" align=\"center\">");
echo("<tr>");
echo("<td align=\"left\" bgcolor=\"#FFFFFF\"><font size=\"3\"><strong><font face=\"Verdana, Arial, Helvetica, sans-serif\">Call Back Updated for $qid.</strong></font></td>");
echo("</table>");
echo ("<div align=\"center\"><a href=\"http://www.snow.co.za\">
<img src=\"back.jpg\" width=\"48\" height=\"48\"><br><strong><em>Back to Snow</em></strong></a></div>");
}
else
echo ("Update Request Failed");
}
?>