SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    Location
    germany
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    login time problem

    hi,

    i created 2 time fields for internal employees for tracking their hour duration spend on project but i struck with one problem that if userA logins to below form and select start time as 9:00 and and stop working at 12:00 and clciks on save ,both select times r stored as well shown in form
    so problem is when he come back to work at 14:00 and login to same project he will get Start time as 9:00(due to i put <?= date('H:i') ?> )instead of login time(14:00) and when he tries to select From time befor 14:00 let say he is trying to avoid his time lapse and select 12:30 then soem alert will be shown that please select proper time(Stop)

    hope it wil be clear

    <form>
    <td nowrap align="center">
    <select name="Start">
    <option selected value="<?=date('H:i')?>"><? echo (date('H:i')); ?></option>
    <? fillDD(0, 0, -1); ?>//this is calling php function to get time from 0 to 23 hrs as well as for min
    </select>
    </td>

    <td nowrap align="center">
    <select name="Stop" onchange="calculateIst()">
    <option value="<?=date('H:i')?>"><? echo (date('H:i')); ?></option>
    <? fillDD(0, 0, -1); ?>
    </select>
    </td>
    <input type="button" value="Save" name="Save" border="1" >
    </form>

    thanks

  2. #2
    SitePoint Addict Resident Evil's Avatar
    Join Date
    May 2003
    Location
    Barrow
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dunno cant u just destroy the time or summet after they have finished or summet? :P


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •