On Wed, Sep 18, 2002 at 06:09:29PM +1000, Jimmy George wrote:
> Hello again World

Hi Jimmy,

> I am trying - half heartily right now - to get a DDMM or similar date
> back from a users server to write to a file when they fill in an order
> form. My first attempt of :-
> 
> <!--#config timefmt="%d%b%y"-->
>     <input type="hidden" name="submit_date" value="&lt;--#echo
> var=&quot;LOCAL_TIME&quot; --&gt;">

First: SSI is _Server_-Side Includes. That means it's parsed on the server,
before it ever gets to the user. Therefore, you can't HTML-escape your SSI
directives, because, as far as the server's concerned, "&gt;" has nothing
whatsoever to do with "<". And anyway, even though the SSI directive is
inside a quoted string, that directive will never reach the user, so it
needs no escaping.

Second: HTML comments (and therefore SSI directives as well) start with "<!--".

Third: I believe the variable you're looking for is "DATE_LOCAL".

This version of the above code works OMM (and on my server):

<!--#config timefmt="%d%b%y"-->
<input type="hidden" name="submit_date" value="<!--#echo var="DATE_LOCAL" -->">

Ugly, yes, but it works.

If you want a purely

> inside the forms shtml page gives an error from the server I check it
> on. The rest of the form is OK with this cut out.
> 
> This shtml page calls a cgi script that simply writes the form content
> to a secure file on the users website and sends a thank you message. I
> have not yet been able to get the server I am hosted from to give me a date!!
> 
> It did take me a week to realise that despite what some books say you DO
> have to have shtml on some machines when SSI is being used. I need some
> sites to look at for more information I think - or some stupidly simple
> piece of cgi that writes today's date to a file when it closes.

Try this: <http://httpd.apache.org/docs/howto/ssi.html>

> GOOD beginners work.
> 
> TIA
> 
> JimmyG

Hope that helps,
-- 
Michael

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to