W3C home > Mailing lists > Public > www-validator@w3.org > February 2006

PHP session tracking in forms generating invalid markup (was Re: Error Message Feedback)

From: David Dorward <david@dorward.me.uk>
Date: Mon, 13 Feb 2006 09:46:11 +0000
To: DifVgg Vorstand <vorstand@difvgg-priebe.de>
Cc: www-validator@w3.org
Message-ID: <20060213094611.GA25380@us-lot.org>

On Sun, Feb 12, 2006 at 07:03:44PM +0100, DifVgg Vorstand wrote:

> i 've got the following problem: validating my page (html 4.01 strict), 
> the validator complains about this line:

> <form action="?log=login_r" method="post"><input type="hidden" 
> name="PHPSESSID" value="46eda3e63dbdf10bc67f702249d90bda" />

Presumably because <input>s cannot be child elements on <form>
elements (although the XHTML-style self closing / is also incorrect in
HTML documents - it is valid, but has different meaning.)
 
> *i can understand, why it is complaining*, but unfortunately i don't 
> know how to fix it. the hidden input field containing the session id is 
> not within my original html-code. it is generated by PHP.

> i don't want to switch the auto-append-session function and add it 
> "manually", if possible..

Generating the HTML by hand was the advice I recieved (from PHP
experts) when I had that problem. I'm not aware of anything
better. (Frankly, I don't consider any of the HTML generating code
built into PHP to be any good.)

(I read the mailing list. Please direct responses there and do not CC
me. Thank-you).

-- 
David Dorward                                      http://dorward.me.uk
Received on Monday, 13 February 2006 09:46:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:20 GMT