date_default_timezone_set("UTC");
$UTCDT = date("Y-m-d H:i:s", time());
Where $UTCDT is inserted in to the table.
This is great of course, as I have essentially made a timestamp for when information was inserted in to the table.
But...here is the but...
I want to have the ability for a user to view the data between 2 times of their choice. What is the best way to go about this? Is there a way to make the following (once it has been sent to a second .php via $_POST and stored as $variables translate in to the date/time format I have selected. I would then use the variables to form a mysql select where between _____ AND ______ type jobby. Thanks

- Code: Select all
echo "Select date range start :";
echo "<select name=\"day\">";
$i="";
while ($i<31){ echo "<option value=".$i.">".$i."</option>"; $i++;}
echo"</select>";
echo "<select name=\"month\">";
$i="";
while ($i<13){ echo "<option value=".$i.">".$i."</option>"; $i++;}
echo"</select>";
echo " Year: <input type=\"text\" name=\"year\">";
echo "End :";
echo "<select name=\"endday\">";
$i="";
while ($i<31){ echo "<option value=".$i.">".$i."</option>"; $i++;}
echo"</select>";
echo "<select name=\"endmonth\">";
$i="";
while ($i<13){ echo "<option value=".$i.">".$i."</option>"; $i++;}
echo"</select>";
echo " Year: <input type=\"text\" name=\"endyear\">";

