SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Letting a user insert a date or time help

    Hi.

    Im trying to make a reminder/task manager site which allows users to add a task and a deadline date/time to the their table.

    I know how to get the date and time from the server using the date() command, but how can i let the user put in their own date and time, for their task?

    Thanks, Cobra

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uh, build a form and then use mktime() on the submitted data?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <?php
    $day = $_GET['day'];
    $month = $_GET['month'];
    $year = $_GET['year'];
    
    echo date("M-d-Y", mktime(0, 0, 0, $month, $day, $year));
    ?> 
    ..to point you in the right direction....

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    England
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks


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
  •