Compare Current Time and time inputed in Textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rinkudhimar
    New Member
    • Jun 2007
    • 13

    Compare Current Time and time inputed in Textbox

    Compare Current Time and time inputed in Textbox
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    just do an if statement where u compare date to date inputed.
    an example would be:

    [PHP]
    $date = date("Y-m-d");
    if($date == $_POST["date"])
    [/PHP]

    it would change if your form's method is set to get or if u display your date in a different way. make sure u tell the user (next to the textbox) what format to enter the date cuz if put it in a different format it will come up wrong.

    hope that helps

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

      Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

      Then when you are ready post a new question in this thread.

      MODERATOR

      Comment

      • nomad
        Recognized Expert Contributor
        • Mar 2007
        • 664

        #4
        Originally posted by rinkudhimar
        Compare Current Time and time inputed in Textbox
        read up on getdate() and echo time() that and you should be able to fix it out.

        nomad

        one other hint you will need to do a checkdate() .

        Comment

        Working...