1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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