"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Here is my problem:
> > When I get the value of $date and I echo it it shows up just fine
> >
> > $date =  date("Y-m-d H:i");
> > echo "$date";
> > 2004-05-15 16:20
> >
> > but when I go to insert the value into a form like this
> >
> > Time:<INPUT type="text" name="Date_and_Time" value=<? echo "$date"; ?>
> > size="50"><br>
> >  it only displays
> > 2004-05-15
> >
> > why is this?????????
> > Annoying
>
> Looks like you are missing the closing > for your value attribute (see
> below).
>
> >
> >
> > <html>
> >
> > <title>
> > Master Station Log
> > </title>
> > <body text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
> > <?
> > $date =  date("Y-m-d H:i");
> > echo "$date";
> > ?>
> >
> > Time:<INPUT type="text" name="Date_and_Time" value=<? echo "$date"; ?>
> > size="50"><br>
> > </body
> > </html>
>
> Don't put quotes around your variables.
>
> echo $date;
>
> <INPUT type="text" name="Date_and_Time" value=<? echo $date; ?>>
size="50">

Bullshit! This is correct:
<INPUT type="text" name="Date_and_Time" value="<? echo $date; ?>" size="50">

Sorry, my fault.

Torsten

> (Pay attention to ?>>)
>
> Regards, Torsten


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to