I think I found your error. You need quotes around the value below or it will be truncated to eg ."Jan".
<input type="hidden" name="date" value=<? print $date; ?>>
What I do when I don't get the result I want when posting forms is to dump the contents of the global vectors $HTTP_GET_VARS or $HTTP_POST_VARS. If you did, you would probably find that the date was truncated from the form. Try the code below. Call it with eg. DumpVars("HTTP_GET_VARS");
// Dump variables in the global vector $vectorName (ie. HTTP_GET_VARS)
function DumpVars($vectorName)
{
global $$vectorName;
$odd = false;
echo "<table border='0' cellpadding='1' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td background='' bgcolor='#444499'>\n";
echo "<table border='0' cellpadding='2' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td background='' bgcolor='#AAAAAA' colspan='2'><b>";
echo "Number of vars in $vectorName : ".count($$vectorName);
echo "</b></td>\n";
echo "</tr>\n";
if (count($$vectorName) > 0)
for (reset($$vectorName); $key = key($$vectorName); next($$vectorName)) {
if ($odd)
$color = "#CCCCCC";
else
$color = "#EEEEEE";
$vec = $$vectorName;
echo "<tr>\n";
echo "<td background='' bgcolor='$color'><b>$key</b> </td>\n";
if (strlen($vec[$key]) == 0)
$str = "<i>none</i>";
else
$str = $vec[$key];
if (is_array($str)) {
$str2 = "Array: ";
for ($i = 0; $i < sizeof($str); $i++) {
$str2 .= " $i:<i>".$str[$i]."</i>";
}
$str = $str2;
}
echo "<td background='' bgcolor='$color'>".$str."</td>\n";
echo "</tr>\n";
$odd = !$odd;
}
echo "</table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br><br>\n";
}
Timestamps works like this:
$timeStamp = time();
echo $timeStamp."<br>";
$date = date("M j Y g:i a", $timeStamp);
echo $date;
It would print something like
978777281
Jan 6 2001 11:34 am
Johan