PHP Date problem

Discussion in 'PHP' started by joshuaadams, May 28, 2008.

  1. #1
    What is wrong with this code???:


    $date = $_REQUEST['date("m/d/y")'] ;



    Sample:
    My name is $name
    The date today is: $date


    Thank you!!:)
     
    joshuaadams, May 28, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    $date = date("m/d/y");
    echo "The date today is: $date";
    PHP:
    Is this what you're looking for :)? Rep appreciated if so :D
     
    jayshah, May 28, 2008 IP
  3. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #3
    $_REQUEST seems to be superfluous.

    Just this should give you the current date as per your format:

    $todaysdate = date("m/d/y") ;
     
    Kuldeep1952, May 28, 2008 IP