Code Comments
Programming Forum and web based access to our favorite programming groups.Anyone know how to enter the time into a form or a website that might
tell how? I'm using the following html code and trying to get the
time to default into the text box. thanks
html code
<tr>
<td><b>Date:</b></td>
<td align="left"><input type="text" name="date" size="8"
maxlength="8"></td>
</tr>
php code
<? print strftime("%m/%d/%Y"); ?>
Post Follow-up to this message"cover" <coverland914 @ yahoo.com> wrote in message
news:1113454894. 4bb141615120e1296a93de388b824915@teranew
s...
> Anyone know how to enter the time into a form or a website that might
> tell how? I'm using the following html code and trying to get the
> time to default into the text box. thanks
>
> html code
> <tr>
> <td><b>Date:</b></td>
> <td align="left"><input type="text" name="date" size="8"
> maxlength="8"></td>
> </tr>
>
> php code
> <? print strftime("%m/%d/%Y"); ?>
<input type="text" name="date" size="8" maxlength="8"
value="<? print strftime("%m/%d/%Y"); ?>">
--
Welcome to Usenet! Please leave tolerance, understanding
and intelligence at the door. They aren't welcome here.
eternal piste erection miuku gmail piste com
Post Follow-up to this messageOn Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine"
<eternal.erectionN05P@Mgmail.com> wrote:
>"cover" <coverland914 @ yahoo.com> wrote in message
>news:1113454894. 4bb141615120e1296a93de388b824915@teranew
s...
>
><input type="text" name="date" size="8" maxlength="8"
>value="<? print strftime("%m/%d/%Y"); ?>">
Tried replacing with your suggested code and the <? print strftrime(
shows up in the form frame window with "> on the outside of the frame
(just to the right). Thank you for the reply. Did that little
snippet of code work on your end with your suggestion?
Post Follow-up to this messagecover wrote: > On Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine" > <eternal.erectionN05P@Mgmail.com> wrote: > > > > > > Tried replacing with your suggested code and the <? print strftrime( > shows up in the form frame window with "> on the outside of the frame > (just to the right). Thank you for the reply. Did that little > snippet of code work on your end with your suggestion? > Try <?php instead of <?. <? only works if short_open_tag is enabled, and sounds as if it isn't on your set-up. -- Oli
Post Follow-up to this message"cover" <coverland914 @ yahoo.com> kirjoitti viestissä:1113486217. 4f48b735f5fb347837b4f6a225e796bd@teranew s... > On Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine" > <eternal.erectionN05P@Mgmail.com> wrote: > > > > Tried replacing with your suggested code and the <? print strftrime( > shows up in the form frame window with "> on the outside of the frame > (just to the right). Thank you for the reply. Did that little > snippet of code work on your end with your suggestion? > That just means that PHP was not executed. I didn't test it, but I've done it million gazillion times to know it works if everything else is okay. I'm curious though, in your previous example: was the date output correctly when the php code was outside the input field? I mean if it was: I don't know what the hell broke it now. It should've been printed below the input field. Just do what Oli suggested and replace <? ?> with <?php ?>. And tell us if you usually get any kind of php output.
Post Follow-up to this messageOn Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine"
<eternal.erectionN05P@Mgmail.com> wrote:
>"cover" <coverland914 @ yahoo.com> wrote in message
>news:1113454894. 4bb141615120e1296a93de388b824915@teranew
s...
>
><input type="text" name="date" size="8" maxlength="8"
>value="<? print strftime("%m/%d/%Y"); ?>">
SUCCESS !!!
Thank you everyone who replied. Appreciate your help and time very
much... :-)
Post Follow-up to this messagecover wrote: > On Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine" > <eternal.erectionN05P@Mgmail.com> wrote: > > > > > > Tried replacing with your suggested code and the <? print strftrime( > shows up in the form frame window with "> on the outside of the frame > (just to the right). Thank you for the reply. Did that little > snippet of code work on your end with your suggestion? > Try <?php instead of <?. <? only works if short_open_tag is enabled, and sounds as if it isn't on your set-up. -- Oli
Post Follow-up to this message"cover" <coverland914 @ yahoo.com> kirjoitti viestissä:1113486217. 4f48b735f5fb347837b4f6a225e796bd@teranew s... > On Thu, 14 Apr 2005 08:51:44 +0300, "Kimmo Laine" > <eternal.erectionN05P@Mgmail.com> wrote: > > > > Tried replacing with your suggested code and the <? print strftrime( > shows up in the form frame window with "> on the outside of the frame > (just to the right). Thank you for the reply. Did that little > snippet of code work on your end with your suggestion? > That just means that PHP was not executed. I didn't test it, but I've done it million gazillion times to know it works if everything else is okay. I'm curious though, in your previous example: was the date output correctly when the php code was outside the input field? I mean if it was: I don't know what the hell broke it now. It should've been printed below the input field. Just do what Oli suggested and replace <? ?> with <?php ?>. And tell us if you usually get any kind of php output.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.