View Single Post
Old 03-13-2012, 06:31 PM   #6 (permalink)
KingOfTheSouth
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

I got this figured out. Where is what I did...

PHP Code:
<select name="start">
          <option value="">-Select One-</option>
          <?php
$query 
"SELECT " $tab['timesheet'] . ".stop FROM " $tab['timesheet'] . " WHERE user = " $user['id'] . " ORDER BY  timesheets.stop DESC LIMIT 1";

$result   mysql_fetch_array(mysql_query($query));
$lastTime date("g:i A"strtotime("01/27/2012 " $result['stop']));
$start    date('G'strtotime("01/27/2012"));
$minutes  0;

for (
$i 0$i 96$i++) {
                
$start date("g:i A"strtotime("01/27/2012 + " $minutes " minutes"));
                
?>
          <option value="<?php
                
echo "$start";
?><?php
                
echo ($start == $lastTime) ? "selected" "";
?> >
          <?php
                
echo $start;
?>
         </option>
          <?php
                $minutes 
+= 15;
                
$start date("G"strtotime("01/27/2012 + " $minutes " minutes"));
//$i = 0; $i < 96; $i++
?>
       </select>
KingOfTheSouth is offline  
Reply With Quote