Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Posts
    43

    Unanswered: HTML Form Field Value

    I have a form field <input type ="text" name="BirthDate" value="<?date_conv($_SESSION[BirthDate])?>">

    date_conv() is a function that returns the date in the MM/DD/YYYY format. This is because the MySQL stores the date in YYYY-MM-DD.

    The problem is that when the page loads nothing shows up in the field. I have other fields(non date) on the form and it works fine, but does not work for this one.

    Any help would be appreicated.

    Thanks.

  2. #2
    Join Date
    Jun 2003
    Location
    Minnesota
    Posts
    61
    try:

    Code:
    echo
    Mr. Lars

  3. #3
    Join Date
    Jan 2004
    Location
    India
    Posts
    168

    Re: HTML Form Field Value

    Try making this change may be it works....
    <input type ="text" name="BirthDate" value="<?date_conv($_SESSION['BirthDate'])?>"> The $_SESSION is an array. So use it this way.

    Regards
    Rajesh

    Originally posted by cmptrguru7
    I have a form field <input type ="text" name="BirthDate" value="<?date_conv($_SESSION[BirthDate])?>">

    date_conv() is a function that returns the date in the MM/DD/YYYY format. This is because the MySQL stores the date in YYYY-MM-DD.

    The problem is that when the page loads nothing shows up in the field. I have other fields(non date) on the form and it works fine, but does not work for this one.

    Any help would be appreicated.

    Thanks.

Posting Permissions

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